mirror of
https://github.com/genemecija/learn-morse-code.git
synced 2026-01-30 03:54:17 +01:00
23 lines
564 B
JavaScript
23 lines
564 B
JavaScript
|
|
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);
|