From 3431ba5a3a27b5d8b0a6a76a5b221e6ce62ea001 Mon Sep 17 00:00:00 2001 From: Alex Luong Date: Fri, 20 Feb 2026 15:05:13 +0700 Subject: [PATCH] perf(portal): skip redundant destination-types refetch on mount Destination types are static data that don't change at runtime. Adding revalidateIfStale: false prevents SWR from refetching on every component mount while still revalidating on focus/reconnect. Co-Authored-By: Claude Opus 4.6 --- internal/portal/src/destination-types.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/portal/src/destination-types.tsx b/internal/portal/src/destination-types.tsx index 80bf1082..26656650 100644 --- a/internal/portal/src/destination-types.tsx +++ b/internal/portal/src/destination-types.tsx @@ -11,6 +11,7 @@ export function useDestinationTypes(): Record< const { data } = useSWR( "destination-types", (path: string) => apiClient.fetchRoot(path), + { revalidateIfStale: false }, ); if (!data) { return {};