From 0c7c2c8b5033cceb064a34cbb640d1272fff8ed8 Mon Sep 17 00:00:00 2001
From: eug-vs <eugene@eug-vs.xyz>
Date: Sat, 11 Jun 2022 13:59:34 +0300
Subject: feat: use table for solutions representation

---
 src/components/Timer.tsx | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

(limited to 'src/components/Timer.tsx')

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 => {
-- 
cgit v1.2.3

