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]);