feat(show-type): global movie/series toggle, type-aware pages and search, ?type=tv in URL
This commit is contained in:
1 parent
5b41dbca10
commit
0824090c6d
21 files changed
+415
-174
No files matched your search
@@ -1,8 +1,15 @@
|
||||
'use client';
|
||||
|
||||
import { useAtomValue } from 'jotai';
|
||||
|
||||
import { showTypeAtom } from '@/components/ShowTypeToggle';
|
||||
import popularQuery from '@/data/queries/popular';
|
||||
import useInfiniteList from '@/hooks/useInfiniteList';
|
||||
|
||||
const usePopular = () => useInfiniteList({ ...popularQuery(), mode: 'default', list: 'popular' });
|
||||
const usePopular = () => {
|
||||
const showType = useAtomValue(showTypeAtom);
|
||||
|
||||
return useInfiniteList({ ...popularQuery({ type: showType }), mode: 'default', list: 'popular' });
|
||||
};
|
||||
|
||||
export default usePopular;
|
||||
Reference in new issue
Block a user