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

@@ -1,8 +1,8 @@
import { FC } from 'react';
import Poster from '@/components/Poster';
import { showPreviewModal } from '@/components/Preview';
import ScrollNavigation from '@/components/ScrollNavigation';
import Card from '@/components/Show';
interface Props {
shows: Show[];
@@ -17,7 +17,7 @@ const Gallery: FC<Props> = ({ shows }) => (
>
{shows.map((show) => (
<li key={show.id} className='snap-start'>
<Card className='!h-[350px] !w-[230px] text-sm' show={show} onClick={() => showPreviewModal({ show })} />
<Poster className='!h-[350px] !w-[230px] text-sm' show={show} onClick={() => showPreviewModal({ show })} />
</li>
))}
</ul>
+4 -4
View File
@@ -1,12 +1,12 @@
export const tabs = [
{
title: 'Trending',
type: 'trending'
},
{
title: 'Streaming',
type: 'streaming'
},
{
title: 'Trending',
type: 'trending'
},
{
title: 'In theaters',
type: 'theater'
+2 -2
View File
@@ -11,8 +11,8 @@ import useTrending from './useTrending';
const Trending: FC = () => {
const [active, setActive] = useState(tabs[0]);
const { data: trending, isFetched } = useTrending({ type: 'trending' });
const { data: streaming } = useTrending({ type: 'streaming' });
const { data: streaming, isFetched } = useTrending({ type: 'streaming' });
const { data: trending } = useTrending({ type: 'trending' });
const { data: theater } = useTrending({ type: 'theater' });
const shows = { trending, streaming, theater }[active.type] || [];