mirror of
https://github.com/genemecija/learn-morse-code.git
synced 2026-04-21 06:03:56 +00:00
Debugging process on morse display clear on keytype switch
This commit is contained in:
parent
a46ce4fd3f
commit
c777cf013c
13 changed files with 94 additions and 108 deletions
|
|
@ -4,10 +4,10 @@ const KeyTypeContext = React.createContext()
|
|||
|
||||
class KeyTypeContextProvider extends Component {
|
||||
state = {
|
||||
keyType: "straight"
|
||||
keyType: "electronic"
|
||||
}
|
||||
|
||||
switchKeyType = (type = "straight") => {
|
||||
switchKeyType = (type) => {
|
||||
this.setState({keyType: type})
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,10 +8,10 @@ function MorseBufferContextProvider(props) {
|
|||
// morseWords: []
|
||||
// //morseCharBuffer, morseWords, clearHistory, setMorseCharBuffer, setMorseWords
|
||||
// }
|
||||
|
||||
console.log('MorseBufferContextProvider LOADED');
|
||||
const [morseCharBuffer, setMorseCharBuffer] = useState('')
|
||||
const [morseWords, setMorseWords] = useState([])
|
||||
|
||||
|
||||
|
||||
// switchKeyType = (type = "straight") => {
|
||||
// this.setState({keyType: type})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue