From a0e6add04de53791cf9e5fe115c57fbb25b5de9c Mon Sep 17 00:00:00 2001 From: Shreerang Kale Date: Mon, 28 Oct 2024 10:53:18 +0530 Subject: [PATCH] Update stop watch for deployment status --- packages/frontend/src/components/StopWatch.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/frontend/src/components/StopWatch.tsx b/packages/frontend/src/components/StopWatch.tsx index fb512e24..d5c7d63d 100644 --- a/packages/frontend/src/components/StopWatch.tsx +++ b/packages/frontend/src/components/StopWatch.tsx @@ -17,7 +17,7 @@ interface StopwatchProps extends Omit { } const Stopwatch = ({ offsetTimestamp, isPaused, ...props }: StopwatchProps) => { - const { totalSeconds, pause } = useStopwatch({ + const { totalSeconds, pause, start } = useStopwatch({ autoStart: true, offsetTimestamp: offsetTimestamp, }); @@ -25,6 +25,8 @@ const Stopwatch = ({ offsetTimestamp, isPaused, ...props }: StopwatchProps) => { useEffect(() => { if (isPaused) { pause(); + } else { + start(); } }, [isPaused]);