From 17b46f7e0227f1bdee6c02371d500e00ddc20b75 Mon Sep 17 00:00:00 2001 From: Jong Eun Lee Date: Tue, 26 Nov 2024 11:24:22 +0800 Subject: [PATCH] fix: Smooth transition for Container Registry enable switch --- react/src/components/ContainerRegistryList.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/react/src/components/ContainerRegistryList.tsx b/react/src/components/ContainerRegistryList.tsx index 579f823561..33367893d5 100644 --- a/react/src/components/ContainerRegistryList.tsx +++ b/react/src/components/ContainerRegistryList.tsx @@ -56,7 +56,7 @@ const ContainerRegistryList: React.FC<{ style?: React.CSSProperties; }> = ({ style }) => { const baiClient = useSuspendedBackendaiClient(); - const [fetchKey, updateFetchKey] = useUpdatableState('initial-fetch'); + const [fetchKey, updateFetchKey] = useUpdatableState('first'); const [isPendingReload, startReloadTransition] = useTransition(); const painKiller = usePainKiller(); const { message } = App.useApp(); @@ -124,7 +124,8 @@ const ContainerRegistryList: React.FC<{ offset: baiPaginationOption.offset, }, { - fetchPolicy: 'store-and-network', + fetchPolicy: + fetchKey === 'first' ? 'store-and-network' : 'network-only', fetchKey, }, );