fix: add posthog error monitor

This commit is contained in:
David Nguyen
2025-02-25 15:14:45 +11:00
parent cedd5e87b1
commit 7e8955b89c
17 changed files with 175 additions and 148 deletions

View File

@ -3,10 +3,12 @@ import { useCallback, useEffect } from 'react';
import { useRevalidator } from 'react-router';
export const RefreshOnFocus = () => {
const { revalidate } = useRevalidator();
const { revalidate, state } = useRevalidator();
const onFocus = useCallback(() => {
void revalidate();
if (state === 'idle') {
void revalidate();
}
}, [revalidate]);
useEffect(() => {