aboutsummaryrefslogtreecommitdiff
path: root/src/components/Timer.tsx
diff options
context:
space:
mode:
authoreug-vs <eugene@eug-vs.xyz>2022-06-11 13:59:34 +0300
committereug-vs <eugene@eug-vs.xyz>2022-06-11 14:01:07 +0300
commit0c7c2c8b5033cceb064a34cbb640d1272fff8ed8 (patch)
tree43f86404064014680a6d29b37651803e514bc9a5 /src/components/Timer.tsx
parent3e3e29527f7bf7b72363a1193b3ee310b1adc2fa (diff)
downloadchrono-cube-ui-0c7c2c8b5033cceb064a34cbb640d1272fff8ed8.tar.gz
feat: use table for solutions representationHEADmaster
Diffstat (limited to 'src/components/Timer.tsx')
-rw-r--r--src/components/Timer.tsx6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/components/Timer.tsx b/src/components/Timer.tsx
index 2d07608..287ebc0 100644
--- a/src/components/Timer.tsx
+++ b/src/components/Timer.tsx
@@ -63,8 +63,10 @@ const Timer: React.FC<PropTypes> = ({ registerResult, maxCountdown = 15000 }) =>
}, [mode, maxCountdown]);
const handleKeyPress = (event: KeyboardEvent): void => {
- event.preventDefault();
- if (event.keyCode === KEY_CODE && mode === Mode.idle) setMode(Mode.countdown);
+ if (event.keyCode === KEY_CODE && mode === Mode.idle) {
+ event.preventDefault();
+ setMode(Mode.countdown);
+ }
};
const handleKeyUp = (event: KeyboardEvent): void => {