feat: favorite & watch lists

This commit is contained in:
ner committed 2024-10-19 16:09:15 +03:00
1 parent 960a7a6242
commit 8858e47d38
51 files changed
+561 -290

No files matched your search

+3 -18
View File
@@ -1,22 +1,7 @@
'use client';
import List from '@/components/List';
import useMounted from '@/hooks/useMounted';
import UsersList from '@/components/UsersLists';
import useFavorites from './useFavorites';
const Container = () => <UsersList list='favorite' label='favorites' />;
export default function Container() {
const { shows } = useFavorites();
const isMounted = useMounted();
if (!isMounted) return null;
if (!shows.length)
return (
<div className='flex h-40 w-full items-center justify-center text-center text-xl text-muted-foreground'>
There are no items in your favorites list
</div>
);
return <List shows={shows} />;
}
export default Container;