From 70a484a2703936c1b043246875b738d5857bf10c Mon Sep 17 00:00:00 2001 From: MarconLP <13001502+MarconLP@users.noreply.github.com> Date: Wed, 19 Apr 2023 00:46:23 +0200 Subject: [PATCH] prevent the counter from wiggling when the time changes --- src/components/StopTime.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/StopTime.tsx b/src/components/StopTime.tsx index a44f51e..a0a523a 100644 --- a/src/components/StopTime.tsx +++ b/src/components/StopTime.tsx @@ -31,5 +31,9 @@ export default function StopTime({ running }: { running?: boolean }) { return () => clearInterval(interval); }, [running]); - return {calculateTimeDuration(secs)}; + return ( +
+ {calculateTimeDuration(secs)} +
+ ); }