mirror of
https://github.com/genemecija/learn-morse-code.git
synced 2026-04-06 06:43:55 +00:00
Mode switching functionality
This commit is contained in:
parent
cad5575ec5
commit
f863d9cc05
16 changed files with 407 additions and 176 deletions
22
src/app-modes/ChallengeMode.js
Normal file
22
src/app-modes/ChallengeMode.js
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
import React from 'react';
|
||||
import '../css/App.css';
|
||||
import useTelegraph from '../hooks/useTelegraph';
|
||||
import ChallengeWord from '../components/ChallengeWord'
|
||||
import MorseBufferDisplay from '../components/MorseBufferDisplay'
|
||||
|
||||
function ChallengeMode() {
|
||||
|
||||
const {morseCharBuffer} = useTelegraph('challenge')
|
||||
|
||||
console.log('ChallengeMode.js rendered')
|
||||
|
||||
return (
|
||||
<>
|
||||
<ChallengeWord word="challenge"/>
|
||||
<MorseBufferDisplay buffer={morseCharBuffer} /><br/>
|
||||
</>
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
export default React.memo(ChallengeMode);
|
||||
Loading…
Add table
Add a link
Reference in a new issue