diff --git a/README.md b/README.md index abb108f..38a614e 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,14 @@ # Learn Morse Code [LearnMorseCode.net](http://learnmorsecode.net) helps beginners learn Morse code through several features, the main of which is a telegraph with live translation. - -
+Watch the video demo [here](https://www.youtube.com/embed/OuL-Z8h4gBQ). + ## Features * **Telegraph**\ Press the button(s) to generate tones. See a live translation of your tones in both Morse code and alphanumeric characters. Customize the telegraph by choosing the telegraph type, tone frequency, and speed (WPM). diff --git a/src/contexts/wordListPickerContext.js b/src/contexts/wordListPickerContext.js index 997c7c5..d4f3bad 100644 --- a/src/contexts/wordListPickerContext.js +++ b/src/contexts/wordListPickerContext.js @@ -16,18 +16,27 @@ function WordListPickerContextProvider(props) { let wordList = [] - if (wordListCategory === 'alphabet') { - wordList = alphabet.words - } else if (wordListCategory === 'numbers') { - wordList = numbers.words - } else if (wordListCategory === 'boys') { - wordList = boys.words - } else if (wordListCategory === 'girls') { - wordList = girls.words - } else if (wordListCategory === 'startrek') { - wordList = trek.words - } else if (wordListCategory === 'common100') { - wordList = common100.words + switch (wordListCategory) { + case "alphabet": + wordList = alphabet.words + break + case "numbers": + wordList = numbers.words + break + case "boys": + wordList = boys.words + break + case "girls": + wordList = girls.words + break + case "startrek": + wordList = trek.words + break + case "common100": + wordList = common100.words + break + default: + wordList = alphabet.words } const wordListCountMax = wordList.length