Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions apps/web/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const queryClient = new QueryClient({
queries: {
retry: false,
staleTime: 1000 * 60 * 5, // 5 minutes
refetchOnWindowFocus: false, // Prevent refetch when switching tabs to avoid form resets
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would actually like to keep it as before, I think this is good thing to sync data on focus in background. I believe the issue we really need to fix is in the apps/web/src/hooks/useCheckCustomDomain.ts.

Adding this line fix screen blinking and rerendering whole app.

  const {
    data: customDomain,
    isLoading: isCustomDomainLoading,
    isFetched,
  } = useQuery({
    ...getStatusPagesDomainByDomainOptions({
      path: {
        domain,
      },
    }),
    refetchOnWindowFocus: false, // <- here
  });

},
mutations: {
retry: false,
Expand Down
Loading