This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import PropTypes from 'prop-types'; | |
| import React, {Fragment, useRef, useState} from 'react'; | |
| import gql from 'graphql-tag'; | |
| import useClickAway from 'react-use/lib/useClickAway'; | |
| import { | |
| Box, | |
| Button, | |
| Dialog, | |
| DialogActions, | |
| DialogContent, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import PackCard from './pack-card'; | |
| import PropTypes from 'prop-types'; | |
| import React, {useEffect} from 'react'; | |
| import {Grid} from '@material-ui/core'; | |
| import {useWindowScroll, useWindowSize} from 'react-use'; | |
| export default function PackBrowserGrid(props) { | |
| const {y} = useWindowScroll(); | |
| const {height} = useWindowSize(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import gql from 'graphql-tag'; | |
| export const PROJECT_FRAGMENT = gql` | |
| fragment ProjectFragment on Project { | |
| id | |
| name | |
| updatedAt | |
| } | |
| `; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import PropTypes from 'prop-types'; | |
| import RateButton from './rate-button'; | |
| import React, {useRef, useState} from 'react'; | |
| import Waveform from './waveform'; | |
| import useHoverDirty from 'react-use/lib/useHoverDirty'; | |
| import { | |
| Box, | |
| IconButton, | |
| MuiThemeProvider, | |
| Tooltip, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| useEffect(() => { | |
| document.addEventListener('keydown', handleKeyDown); | |
| return () => { | |
| document.removeEventListener('keydown', handleKeyDown); | |
| }; | |
| }, []); | |
| function handleKeyDown(event) { | |
| console.log(event); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module.exports = { | |
| plugins: [ | |
| { | |
| resolve: 'gatsby-theme-esports', | |
| options: { | |
| root: __dirname | |
| } | |
| } | |
| ] | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function spellingBeeSolutions(wordList, puzzles) { | |
| return puzzles.map(puzzle => { | |
| const puzzleLetters = puzzle.split(''); | |
| return wordList.reduce((acc, word) => { | |
| const letters = word.split(''); | |
| const match = letters.every( | |
| letter => puzzleLetters.includes(letter) | |
| ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function ProductsList() { | |
| const {loading, error, data} = useQuery(LIST_PRODUCTS); | |
| if (loading) return 'Loading...'; | |
| if (error) return error.message; | |
| return ( | |
| <ul> | |
| {data.products.map(product => ( | |
| <li key={product.id}>{product.name}</li> | |
| ))} | |
| </ul> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const visit = require('unist-util-visit'); | |
| const babel = require('@babel/core'); | |
| const ts = ['ts', 'tsx', 'typescript']; | |
| const babelOptions = { | |
| presets: [ | |
| [ | |
| '@babel/typescript', | |
| { | |
| allExtensions: true, |