mirror of
https://github.com/genemecija/learn-morse-code.git
synced 2026-01-10 18:51:25 +01:00
22 lines
659 B
JavaScript
22 lines
659 B
JavaScript
import React from 'react';
|
|
import '../css/App.css';
|
|
import useTelegraph from '../hooks/useTelegraph';
|
|
import MorseBufferDisplay from '../components/MorseBufferDisplay'
|
|
import MorseDisplay from '../components/MorseDisplay'
|
|
|
|
function PracticeMode() {
|
|
console.log("PracticeMode loaded");
|
|
const {morseCharBuffer, morseWords, clearHistory} = useTelegraph('practice')
|
|
|
|
return (
|
|
<>
|
|
<MorseBufferDisplay buffer={morseCharBuffer} /><br/>
|
|
<MorseDisplay morseWords={morseWords} /><br/>
|
|
<button onClick={clearHistory}>Clear Morse History</button><br/>
|
|
</>
|
|
);
|
|
|
|
}
|
|
|
|
export default React.memo(PracticeMode);
|