feat: account

This commit is contained in:
ner committed 2024-10-18 18:56:34 +03:00
1 parent df0f7c943b
commit 043375f44a
17 files changed
+305 -131

No files matched your search

+21
View File
@@ -0,0 +1,21 @@
import { usersShows } from '@/api';
import useInfiniteList from './useInfiniteList';
import { useSession } from './useSession';
const useFavorites = ({
showType,
listType = 'favorites'
}: {
showType: Show['type'];
listType: 'favorites' | 'watchlist';
}) => {
const session = useSession();
return useInfiniteList({
queryKey: [`users-${listType}`, showType],
queryFn: () => usersShows({ showType, listType }),
enabled: Boolean(session)
});
};
export default useFavorites;