fix: conditionally enable useGetFoldersQuery in AppInitPage after initial fetch (#4773)
✨ (AppInitPage/index.tsx): add support for refetching folders data when isFetched is true to keep data up to date
This commit is contained in:
parent
6fe7a58c8d
commit
3160c54102
1 changed files with 3 additions and 1 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue