We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ae90d1e commit d7b3798Copy full SHA for d7b3798
1 file changed
src/components/summary/QuietForSeconds.tsx
@@ -14,7 +14,8 @@ interface QuietForSecondsProps {
14
export default function QuietForSeconds({ timestamp }: QuietForSecondsProps) {
15
const [now, setNow] = useState(Date.now());
16
17
- const elapsedMs = now - timestamp;
+ // Ensure elapsed time is never negative (can happen with clock drift)
18
+ const elapsedMs = Math.max(0, now - timestamp);
19
const isLessThanOneMinute = elapsedMs < 60 * 1000;
20
21
useEffect(() => {
0 commit comments