From 92324fc45f1a3f34953b2d2dcc6d55196ca3aedb Mon Sep 17 00:00:00 2001 From: Thomas Ruoff Date: Sun, 1 Nov 2020 22:22:59 +0100 Subject: [PATCH] disable revalidate on swr --- components/wizard/context/wizardStore.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/components/wizard/context/wizardStore.tsx b/components/wizard/context/wizardStore.tsx index dfb3d47..cca1e62 100644 --- a/components/wizard/context/wizardStore.tsx +++ b/components/wizard/context/wizardStore.tsx @@ -171,7 +171,12 @@ export default function WizardStore({ children }) { const [state, dispatch] = useReducer(reducer, initialState) const { data: daysBooked, error: daysBookedError } = useSWR( '/api/daysbooked', - fetcher + fetcher, + { + revalidateOnFocus: true, + revalidateOnReconnect: true, + focusThrottleInterval: 24 * 60 * 60 * 1000, + } ) useEffect(() => {