README update, code cleanup

This commit is contained in:
Gene Mecija 2020-03-03 01:03:55 -08:00
parent 2a7d6f8a87
commit 0ce7951d6d
2 changed files with 23 additions and 14 deletions

View file

@ -1,14 +1,14 @@
# Learn Morse Code # 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. [LearnMorseCode.net](http://learnmorsecode.net) helps beginners learn Morse code through several features, the main of which is a telegraph with live translation.
<table><tr><td> <table><tr><td>
<img src="telegraph.gif" <img src="telegraph.gif"
width=325px width=325px
shadow=10px> shadow=10px>
</td></tr></table> </td></tr></table>
Watch the video demo [here](https://www.youtube.com/embed/OuL-Z8h4gBQ).
## Features ## Features
* **Telegraph**\ * **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). 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).

View file

@ -16,18 +16,27 @@ function WordListPickerContextProvider(props) {
let wordList = [] let wordList = []
if (wordListCategory === 'alphabet') { switch (wordListCategory) {
case "alphabet":
wordList = alphabet.words wordList = alphabet.words
} else if (wordListCategory === 'numbers') { break
case "numbers":
wordList = numbers.words wordList = numbers.words
} else if (wordListCategory === 'boys') { break
case "boys":
wordList = boys.words wordList = boys.words
} else if (wordListCategory === 'girls') { break
case "girls":
wordList = girls.words wordList = girls.words
} else if (wordListCategory === 'startrek') { break
case "startrek":
wordList = trek.words wordList = trek.words
} else if (wordListCategory === 'common100') { break
case "common100":
wordList = common100.words wordList = common100.words
break
default:
wordList = alphabet.words
} }
const wordListCountMax = wordList.length const wordListCountMax = wordList.length