This commit is contained in:
louiscklaw
2025-04-29 16:09:30 +08:00
parent 4c72861eda
commit 9d3e832081
29 changed files with 446 additions and 136 deletions

View File

@@ -0,0 +1,19 @@
import { usePocketBase } from './usePocketBase';
import { useQuery } from '@tanstack/react-query';
const useListMatchingFrenzyCategories = () => {
const { user, pb } = usePocketBase();
return useQuery({
queryKey: ['useListMatchingFrenzyCategories'],
staleTime: 60 * 1000,
queryFn: async () => {
return await pb.collection('QuizMFCategories').getList<MatchingFrenzyCategory>(1, 9999, {
$autoCancel: false,
});
},
// enabled: !!user?.id,
});
};
export default useListMatchingFrenzyCategories;