From 6417c76ebbed2dbaf7d57d948a344cede5775358 Mon Sep 17 00:00:00 2001 From: No767 <73260931+No767@users.noreply.github.com> Date: Thu, 7 May 2026 04:51:04 -0700 Subject: [PATCH 1/2] dont bring down the whole page when network error exists --- src/routes/index.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/routes/index.tsx b/src/routes/index.tsx index cb3c4d77..3e553b7f 100644 --- a/src/routes/index.tsx +++ b/src/routes/index.tsx @@ -24,7 +24,10 @@ import { cn } from "@/lib/utils"; export const Route = createFileRoute("/")({ component: Index, - loader: ({ context: { queryClient } }) => queryClient.ensureQueryData(eventsQueryOptions), + // `prefetchQuery` warms the cache without rejecting on fetch errors. If the API is down, + // the route still renders and `useQuery` falls into the error state, which the carousel + // gracefully degrades to an empty list — instead of taking the whole page down. + loader: ({ context: { queryClient } }) => queryClient.prefetchQuery(eventsQueryOptions), }); /// Interfaces & Types From 69e0e38d080e7c383964db2becc6e7eeb86097ab Mon Sep 17 00:00:00 2001 From: No767 <73260931+No767@users.noreply.github.com> Date: Thu, 7 May 2026 04:57:41 -0700 Subject: [PATCH 2/2] done --- src/routes/index.tsx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/routes/index.tsx b/src/routes/index.tsx index 3e553b7f..f2a25625 100644 --- a/src/routes/index.tsx +++ b/src/routes/index.tsx @@ -24,9 +24,6 @@ import { cn } from "@/lib/utils"; export const Route = createFileRoute("/")({ component: Index, - // `prefetchQuery` warms the cache without rejecting on fetch errors. If the API is down, - // the route still renders and `useQuery` falls into the error state, which the carousel - // gracefully degrades to an empty list — instead of taking the whole page down. loader: ({ context: { queryClient } }) => queryClient.prefetchQuery(eventsQueryOptions), }); @@ -142,6 +139,13 @@ const eventsQueryOptions = queryOptions({ // Events don't change minute-to-minute; treat the cache as fresh for a minute so // navigating back/forward doesn't refetch immediately. staleTime: 60_000, + + // Once Kanae is live, then these will be removed + // So we don't send out a ton of API requests for no reason + retry: false, + refetchOnWindowFocus: false, + refetchOnReconnect: false, + refetchOnMount: false, }); function Index() {