mirror of
https://github.com/genemecija/learn-morse-code.git
synced 2026-04-21 06:03:56 +00:00
Resolved WPM change/telegraph timing bug
This commit is contained in:
parent
4b4030a88d
commit
f6384b30ef
11 changed files with 120 additions and 317 deletions
|
|
@ -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/>
|
||||
</>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue