Layout, styling, WPM buttons & functionality, Morse Buttons

This commit is contained in:
Gene Mecija 2020-01-30 01:23:56 -08:00
parent 5759522aff
commit a41921c15b
17 changed files with 649 additions and 368 deletions

View file

@ -5,7 +5,7 @@ const WordFeederContext = React.createContext()
function WordFeederContextProvider(props) {
console.log('LOADED: wordFeederContext');
// let wordList = ['hi', 'morse', 'code', 'hello', 'gene']
const {wordList, wordListShuffled} = useContext(WordListPickerContext)
const {wordList, wordListShuffled, wordListCategory} = useContext(WordListPickerContext)
const [wordIndex, setWordIndex] = useState(0)
const [order, setOrder] = useState('sequential')

View file

@ -42,7 +42,7 @@ function WordListPickerContextProvider(props) {
return (
<WordListPickerContext.Provider value={{wordList: wordList, wordListShuffled: randomize(wordList), setWordListCategory: setWordListCategory}}>
<WordListPickerContext.Provider value={{wordList: wordList, wordListShuffled: randomize(wordList), wordListCategory: wordListCategory, setWordListCategory: setWordListCategory}}>
{props.children}
</WordListPickerContext.Provider>
)

View file

@ -8,8 +8,9 @@ function WPMContextProvider(props) {
return (
<WPMContext.Provider value={{
wpm: wpm,
setWPM: setWPM}}>
wpm: Number(wpm),
setWPM: setWPM}
}>
{props.children}
</WPMContext.Provider>
)