Fetch live count on mount to override stale initialCount

This commit is contained in:
Francisco Ignácio Fontoura Solla 2026-05-01 10:21:55 -03:00
parent 260f75abe8
commit 166104bbac

View file

@ -73,6 +73,10 @@ export const SignatureCounter = ({
}
}
// Busca o valor real imediatamente ao montar,
// pois o initialCount pode estar defasado (página gerada estaticamente).
refetch()
const interval = setInterval(() => {
if (document.visibilityState === 'visible') refetch()
}, POLL_INTERVAL_MS)