Skip to content

Commit d7b3798

Browse files
Quiet For should exclude UP and OK items
1 parent ae90d1e commit d7b3798

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/components/summary/QuietForSeconds.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ interface QuietForSecondsProps {
1414
export default function QuietForSeconds({ timestamp }: QuietForSecondsProps) {
1515
const [now, setNow] = useState(Date.now());
1616

17-
const elapsedMs = now - timestamp;
17+
// Ensure elapsed time is never negative (can happen with clock drift)
18+
const elapsedMs = Math.max(0, now - timestamp);
1819
const isLessThanOneMinute = elapsedMs < 60 * 1000;
1920

2021
useEffect(() => {

0 commit comments

Comments
 (0)