mirror of
https://github.com/genemecija/learn-morse-code.git
synced 2026-04-21 06:03:56 +00:00
Layout, styling, WPM buttons & functionality, Morse Buttons
This commit is contained in:
parent
5759522aff
commit
a41921c15b
17 changed files with 649 additions and 368 deletions
|
|
@ -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')
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
)
|
||||
|
|
|
|||
|
|
@ -8,8 +8,9 @@ function WPMContextProvider(props) {
|
|||
|
||||
return (
|
||||
<WPMContext.Provider value={{
|
||||
wpm: wpm,
|
||||
setWPM: setWPM}}>
|
||||
wpm: Number(wpm),
|
||||
setWPM: setWPM}
|
||||
}>
|
||||
{props.children}
|
||||
</WPMContext.Provider>
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue