add life data for tanstak table
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import { QueryClient } from '@tanstack/react-query';
|
||||
import { getUserData } from '@/app/actions/action';
|
||||
import {getUserFilesData} from '@/app/actions/fileEntity';
|
||||
|
||||
export async function prefetchLayoutQueries(queryClient: QueryClient) {
|
||||
await Promise.all([
|
||||
queryClient.prefetchQuery({
|
||||
queryKey: ['userData'],
|
||||
queryFn: () => getUserData()
|
||||
}),
|
||||
queryClient.prefetchQuery({
|
||||
queryKey: ['userFilesData'],
|
||||
queryFn: () => getUserFilesData()
|
||||
}),
|
||||
]);
|
||||
}
|
||||
Reference in New Issue
Block a user