Skip to content

Commit

Permalink
fix: Smooth transition for Container Registry enable switch
Browse files Browse the repository at this point in the history
  • Loading branch information
yomybaby committed Nov 26, 2024
1 parent 3f18c86 commit 17b46f7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions react/src/components/ContainerRegistryList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -124,7 +124,8 @@ const ContainerRegistryList: React.FC<{
offset: baiPaginationOption.offset,
},
{
fetchPolicy: 'store-and-network',
fetchPolicy:
fetchKey === 'first' ? 'store-and-network' : 'network-only',
fetchKey,
},
);
Expand Down

0 comments on commit 17b46f7

Please sign in to comment.