mirror of
https://github.com/documenso/documenso.git
synced 2025-11-12 07:43:16 +10:00
fix: add posthog error monitor
This commit is contained in:
@ -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(() => {
|
||||
|
||||
Reference in New Issue
Block a user