Resolved WPM change/telegraph timing bug

This commit is contained in:
Gene Mecija 2020-01-27 03:21:41 -08:00
parent 4b4030a88d
commit f6384b30ef
11 changed files with 120 additions and 317 deletions

View file

@ -1,25 +1,13 @@
import React, {useContext} from 'react';
import React from 'react';
import '../css/App.css';
import {KeyTypeContext} from "../contexts/keyTypeContext"
import StraightKey from '../components/StraightKey'
import ElectronicKey from '../components/ElectronicKey'
import MorseBufferDisplay from '../components/MorseBufferDisplay'
import MorseHistory from '../components/MorseHistory'
import { WPMContext } from '../contexts/wpmContext';
import { GameModeContext } from '../contexts/gameModeContext';
import useStraightKey from '../hooks/useStraightKey';
export default React.memo(function PracticeMode() {
const {keyType} = useContext(KeyTypeContext)
const {gameMode} = useContext(GameModeContext)
const {wpm} = useContext(WPMContext)
export default (function PracticeMode(props) {
return (
<>
{keyType === "straight" ? <StraightKey gameMode={gameMode} wpm={wpm} /> : <ElectronicKey gameMode={gameMode} wpm={wpm} />}
<MorseBufferDisplay /><br/>
<MorseHistory /><br/>
</>