Skip to content

Commit

Permalink
fix: conditionally enable useGetFoldersQuery in AppInitPage after ini…
Browse files Browse the repository at this point in the history
…tial fetch (#4773)

✨ (AppInitPage/index.tsx): add support for refetching folders data when isFetched is true to keep data up to date
  • Loading branch information
Cristhianzl authored Nov 21, 2024
1 parent 6fe7a58 commit 3160c54
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/frontend/src/pages/AppInitPage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@ export function AppInitPage() {
useGetGlobalVariables({ enabled: isFetched });
useGetBasicExamplesQuery({ enabled: isFetched });
useGetTagsQuery({ enabled: isFetched });
const { refetch: refetchFolders } = useGetFoldersQuery({
enabled: isFetched,
});

const { refetch: refetchFolders } = useGetFoldersQuery();
useEffect(() => {
if (isFetched) {
refreshStars();
Expand Down

0 comments on commit 3160c54

Please sign in to comment.