feat(show-type): global movie/series toggle, type-aware pages and search, ?type=tv in URL

This commit is contained in:
ner committed 2026-09-24 15:40:01 +03:00
1 parent 5b41dbca10
commit 0824090c6d
21 files changed
+415 -174

No files matched your search

+12 -2
View File
@@ -1,9 +1,19 @@
'use client';
import { useAtomValue } from 'jotai';
import { showTypeAtom } from '@/components/ShowTypeToggle';
import popularQuery from '@/data/queries/popular';
import useInfiniteList from '@/hooks/useInfiniteList';
const useTop = () =>
useInfiniteList({ ...popularQuery({ sortBy: 'vote_average.desc' }), mode: 'default', list: 'top' });
const useTop = () => {
const showType = useAtomValue(showTypeAtom);
return useInfiniteList({
...popularQuery({ sortBy: 'vote_average.desc', type: showType }),
mode: 'default',
list: 'top'
});
};
export default useTop;