Dashboard: hooks cleanup

Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
marcin mikołajczak
2024-04-07 12:03:10 +02:00
parent 9375f1f117
commit 890975fe93
11 changed files with 142 additions and 88 deletions

View File

@@ -25,7 +25,7 @@ const useModerationLog = () => {
};
const queryInfo = useInfiniteQuery({
queryKey: ['moderation_log'],
queryKey: ['admin', 'moderation_log'],
queryFn: ({ pageParam }) => getModerationLog(pageParam),
initialPageParam: 1,
getNextPageParam: (page, allPages) => flattenPages(allPages)!.length >= page.total ? undefined : allPages.length + 1,