feat(seo): crawlable show links, intercepted preview modal, real 404s
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
919dcf9a42
commit
25a5d535a4
21 files changed
+211
-107
No files matched your search
File renamed without changes.
@@ -0,0 +1,7 @@
|
|||||||
|
import { createShowMetadata, createShowPage } from '../../showPage';
|
||||||
|
|
||||||
|
export const generateMetadata = createShowMetadata('movie');
|
||||||
|
|
||||||
|
const MoviePage = createShowPage('movie');
|
||||||
|
|
||||||
|
export default MoviePage;
|
||||||
@@ -0,0 +1,59 @@
|
|||||||
|
import { dehydrate, HydrationBoundary } from '@tanstack/react-query';
|
||||||
|
import { Metadata } from 'next';
|
||||||
|
import { notFound } from 'next/navigation';
|
||||||
|
|
||||||
|
import detailsQuery from '@/data/queries/details';
|
||||||
|
import { SITE_URL, TITLE } from '@/env';
|
||||||
|
import getQueryClient from '@/lib/queryClient';
|
||||||
|
|
||||||
|
import Container from './container';
|
||||||
|
|
||||||
|
interface Props {
|
||||||
|
params: { id: string };
|
||||||
|
}
|
||||||
|
|
||||||
|
export const createShowMetadata =
|
||||||
|
(showType: Show['type']) =>
|
||||||
|
async ({ params: { id } }: Props): Promise<Metadata> => {
|
||||||
|
const queryClient = getQueryClient();
|
||||||
|
|
||||||
|
try {
|
||||||
|
const { title, overview, poster } = await queryClient.fetchQuery(detailsQuery({ showId: Number(id), showType }));
|
||||||
|
|
||||||
|
return {
|
||||||
|
title: `${title} | ${TITLE}`,
|
||||||
|
description: overview,
|
||||||
|
openGraph: {
|
||||||
|
title,
|
||||||
|
description: overview,
|
||||||
|
images: [poster['2x']],
|
||||||
|
type: 'website',
|
||||||
|
url: `${SITE_URL}/${showType}/${id}`
|
||||||
|
}
|
||||||
|
};
|
||||||
|
} catch (_) {
|
||||||
|
return notFound();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
export const createShowPage = (showType: Show['type']) => {
|
||||||
|
const ShowPage = async ({ params: { id } }: Props) => {
|
||||||
|
const queryClient = getQueryClient();
|
||||||
|
|
||||||
|
const showId = Number(id);
|
||||||
|
|
||||||
|
try {
|
||||||
|
await queryClient.fetchQuery(detailsQuery({ showId, showType }));
|
||||||
|
} catch (_) {
|
||||||
|
return notFound();
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<HydrationBoundary state={dehydrate(queryClient)}>
|
||||||
|
<Container showId={showId} showType={showType} />
|
||||||
|
</HydrationBoundary>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
return ShowPage;
|
||||||
|
};
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
import { createShowMetadata, createShowPage } from '../../showPage';
|
||||||
|
|
||||||
|
export const generateMetadata = createShowMetadata('tv');
|
||||||
|
|
||||||
|
const SeriesPage = createShowPage('tv');
|
||||||
|
|
||||||
|
export default SeriesPage;
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
import { FC } from 'react';
|
||||||
|
|
||||||
|
import PreviewModal from '../../preview';
|
||||||
|
|
||||||
|
interface Props {
|
||||||
|
params: { id: string };
|
||||||
|
}
|
||||||
|
|
||||||
|
const MovieModal: FC<Props> = ({ params: { id } }) => <PreviewModal showId={Number(id)} showType='movie' />;
|
||||||
|
|
||||||
|
export default MovieModal;
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
import { FC } from 'react';
|
||||||
|
|
||||||
|
import PreviewModal from '../../preview';
|
||||||
|
|
||||||
|
interface Props {
|
||||||
|
params: { id: string };
|
||||||
|
}
|
||||||
|
|
||||||
|
const SeriesModal: FC<Props> = ({ params: { id } }) => <PreviewModal showId={Number(id)} showType='tv' />;
|
||||||
|
|
||||||
|
export default SeriesModal;
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
// Matches every non-intercepted route so the preview modal unmounts
|
||||||
|
// when navigating elsewhere (e.g. to a person page from the credits).
|
||||||
|
const CatchAll = () => null;
|
||||||
|
|
||||||
|
export default CatchAll;
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
const Default = () => null;
|
||||||
|
|
||||||
|
export default Default;
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
// Matches the root route so the preview modal unmounts when navigating home.
|
||||||
|
const Empty = () => null;
|
||||||
|
|
||||||
|
export default Empty;
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
'use client';
|
||||||
|
|
||||||
|
import { FC } from 'react';
|
||||||
|
import { useAtomValue } from 'jotai';
|
||||||
|
import { useRouter } from 'next/navigation';
|
||||||
|
|
||||||
|
import Preview from '@/components/Preview';
|
||||||
|
import { previewSeedAtom } from '@/components/Preview/seed';
|
||||||
|
import { Modal } from '@/components/ui/dialog';
|
||||||
|
|
||||||
|
interface Props {
|
||||||
|
showId: Show['id'];
|
||||||
|
showType: Show['type'];
|
||||||
|
}
|
||||||
|
|
||||||
|
const PreviewModal: FC<Props> = ({ showId, showType }) => {
|
||||||
|
const router = useRouter();
|
||||||
|
const seed = useAtomValue(previewSeedAtom);
|
||||||
|
|
||||||
|
const show = seed?.id === showId && seed?.type === showType ? seed : undefined;
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Modal className='block bg-background p-0 md:bg-black' onClose={() => router.back()}>
|
||||||
|
<Preview modal show={show} showId={showId} showType={showType} />
|
||||||
|
</Modal>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default PreviewModal;
|
||||||
@@ -1,62 +0,0 @@
|
|||||||
import { FC } from 'react';
|
|
||||||
import { dehydrate, HydrationBoundary } from '@tanstack/react-query';
|
|
||||||
import { Metadata } from 'next';
|
|
||||||
import { redirect } from 'next/navigation';
|
|
||||||
|
|
||||||
import detailsQuery from '@/data/queries/details';
|
|
||||||
import { SITE_URL, TITLE } from '@/env';
|
|
||||||
import getQueryClient from '@/lib/queryClient';
|
|
||||||
|
|
||||||
import Container from './container';
|
|
||||||
|
|
||||||
interface Props {
|
|
||||||
params: { show: [Show['type'], Show['id']] };
|
|
||||||
}
|
|
||||||
|
|
||||||
export const generateMetadata = async ({ params: { show } }: Props): Promise<Metadata> => {
|
|
||||||
const queryClient = getQueryClient();
|
|
||||||
|
|
||||||
const [showType, showId] = show as [Show['type'], Show['id']];
|
|
||||||
|
|
||||||
if (!showType || !showId) return redirect('/');
|
|
||||||
|
|
||||||
try {
|
|
||||||
const { title, overview, poster } = await queryClient.fetchQuery(detailsQuery({ showId, showType }));
|
|
||||||
|
|
||||||
return {
|
|
||||||
title: `${title} | ${TITLE}`,
|
|
||||||
description: overview,
|
|
||||||
openGraph: {
|
|
||||||
title,
|
|
||||||
description: overview,
|
|
||||||
images: [poster['2x']],
|
|
||||||
type: 'website',
|
|
||||||
url: `${SITE_URL}/${showType}/${showId}`
|
|
||||||
}
|
|
||||||
};
|
|
||||||
} catch (_) {
|
|
||||||
return redirect('/');
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const ShowPage: FC<Props> = async ({ params: { show } }) => {
|
|
||||||
const queryClient = getQueryClient();
|
|
||||||
|
|
||||||
const [showType, showId] = show as [Show['type'], Show['id']];
|
|
||||||
|
|
||||||
if (!showType || !showId) return redirect('/');
|
|
||||||
|
|
||||||
try {
|
|
||||||
await queryClient.fetchQuery(detailsQuery({ showId, showType }));
|
|
||||||
} catch (_) {
|
|
||||||
return redirect('/');
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
|
||||||
<HydrationBoundary state={dehydrate(queryClient)}>
|
|
||||||
<Container showId={showId} showType={showType} />
|
|
||||||
</HydrationBoundary>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default ShowPage;
|
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
import { ReactNode } from 'react';
|
||||||
|
|
||||||
|
const SiteLayout = ({ children, modal }: { children: ReactNode; modal: ReactNode }) => (
|
||||||
|
<>
|
||||||
|
{children}
|
||||||
|
{modal}
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
|
||||||
|
export default SiteLayout;
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
import { FC } from 'react';
|
import { FC } from 'react';
|
||||||
import { dehydrate, HydrationBoundary } from '@tanstack/react-query';
|
import { dehydrate, HydrationBoundary } from '@tanstack/react-query';
|
||||||
import { Metadata } from 'next';
|
import { Metadata } from 'next';
|
||||||
import { redirect } from 'next/navigation';
|
import { notFound } from 'next/navigation';
|
||||||
|
|
||||||
import Person from '@/components/Person';
|
import Person from '@/components/Person';
|
||||||
import personQuery from '@/data/queries/person';
|
import personQuery from '@/data/queries/person';
|
||||||
@@ -32,15 +32,13 @@ export const generateMetadata = async ({ params: { id } }: Props): Promise<Metad
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
} catch (_) {
|
} catch (_) {
|
||||||
return { title: TITLE };
|
return notFound();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const PersonPage: FC<Props> = async ({ params: { id } }) => {
|
const PersonPage: FC<Props> = async ({ params: { id } }) => {
|
||||||
const queryClient = getQueryClient();
|
const queryClient = getQueryClient();
|
||||||
|
|
||||||
if (!id) return redirect('/');
|
|
||||||
|
|
||||||
queryClient.prefetchQuery(personQuery({ personId: id }));
|
queryClient.prefetchQuery(personQuery({ personId: id }));
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -0,0 +1,15 @@
|
|||||||
|
import Link from 'next/link';
|
||||||
|
|
||||||
|
import { Button } from '@/components/ui/button';
|
||||||
|
|
||||||
|
const NotFound = () => (
|
||||||
|
<div className='flex flex-1 flex-col items-center justify-center gap-4 py-24 text-center'>
|
||||||
|
<span className='text-6xl'>404</span>
|
||||||
|
<p className='text-muted-foreground'>We couldn’t find that page, movie, or series.</p>
|
||||||
|
<Button asChild variant='outline'>
|
||||||
|
<Link href='/'>Back to home</Link>
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
|
||||||
|
export default NotFound;
|
||||||
@@ -84,7 +84,7 @@ export const showSearchModal = create(({ onResolve }) => {
|
|||||||
shows={shows}
|
shows={shows}
|
||||||
customScrollParent={scrollRef.current}
|
customScrollParent={scrollRef.current}
|
||||||
fetchNextPage={fetchNextPage}
|
fetchNextPage={fetchNextPage}
|
||||||
onPreviewClose={onResolve}
|
onNavigate={onResolve}
|
||||||
/>
|
/>
|
||||||
</TabsContent>
|
</TabsContent>
|
||||||
))}
|
))}
|
||||||
@@ -96,7 +96,7 @@ export const showSearchModal = create(({ onResolve }) => {
|
|||||||
shows={shows}
|
shows={shows}
|
||||||
customScrollParent={scrollRef.current}
|
customScrollParent={scrollRef.current}
|
||||||
fetchNextPage={fetchNextPage}
|
fetchNextPage={fetchNextPage}
|
||||||
onPreviewClose={onResolve}
|
onNavigate={onResolve}
|
||||||
/>
|
/>
|
||||||
))
|
))
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -1,33 +1,41 @@
|
|||||||
|
'use client';
|
||||||
|
|
||||||
import { FC } from 'react';
|
import { FC } from 'react';
|
||||||
import { VirtuosoGrid, VirtuosoGridProps } from 'react-virtuoso';
|
import { VirtuosoGrid, VirtuosoGridProps } from 'react-virtuoso';
|
||||||
|
import { useSetAtom } from 'jotai';
|
||||||
|
|
||||||
import Poster from '@/components/Poster';
|
import Poster from '@/components/Poster';
|
||||||
import { showPreviewModal } from '@/components/Preview';
|
import { previewSeedAtom } from '@/components/Preview/seed';
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
shows: Show[];
|
shows: Show[];
|
||||||
customScrollParent?: HTMLElement;
|
customScrollParent?: HTMLElement;
|
||||||
fetchNextPage?: () => void;
|
fetchNextPage?: () => void;
|
||||||
onPreviewClose?: () => void;
|
onNavigate?: () => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
const components: VirtuosoGridProps<Movie, { shows: Show[]; onClick: (show: Show) => void }>['components'] = {
|
const components: VirtuosoGridProps<Movie, { shows: Show[]; onNavigate: (show: Show) => void }>['components'] = {
|
||||||
Item: ({ context, 'data-index': index }) => {
|
Item: ({ context, 'data-index': index }) => {
|
||||||
const { shows, onClick } = context!;
|
const { shows, onNavigate } = context!;
|
||||||
const show = shows?.[index];
|
const show = shows?.[index];
|
||||||
|
|
||||||
if (!show) return null;
|
if (!show) return null;
|
||||||
|
|
||||||
return <Poster show={show} onClick={() => onClick?.(show)} />;
|
return <Poster show={show} href={`/${show.type}/${show.id}`} onClick={() => onNavigate(show)} />;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const List: FC<Props> = ({ shows, fetchNextPage, onPreviewClose, customScrollParent }) => {
|
const List: FC<Props> = ({ shows, fetchNextPage, onNavigate, customScrollParent }) => {
|
||||||
|
const setPreviewSeed = useSetAtom(previewSeedAtom);
|
||||||
|
|
||||||
if (!shows.length) return null;
|
if (!shows.length) return null;
|
||||||
|
|
||||||
const context = {
|
const context = {
|
||||||
shows,
|
shows,
|
||||||
onClick: (show: Show) => showPreviewModal({ show, onClose: onPreviewClose })
|
onNavigate: (show: Show) => {
|
||||||
|
setPreviewSeed(show);
|
||||||
|
onNavigate?.();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleFetchMore = () => fetchNextPage?.();
|
const handleFetchMore = () => fetchNextPage?.();
|
||||||
|
|||||||
@@ -1,24 +1,28 @@
|
|||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import { FC } from 'react';
|
import { FC } from 'react';
|
||||||
|
import Link from 'next/link';
|
||||||
|
|
||||||
import { useMutateShowState } from '@/hooks/useShowState';
|
import { useMutateShowState } from '@/hooks/useShowState';
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
show: Show;
|
show: Show;
|
||||||
|
href?: string;
|
||||||
onClick?: () => void;
|
onClick?: () => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
const Handlers: FC<Props> = ({ onClick, show }) => {
|
const Handlers: FC<Props> = ({ href, onClick, show }) => {
|
||||||
const { mutate } = useMutateShowState(show);
|
const { mutate } = useMutateShowState(show);
|
||||||
|
|
||||||
return (
|
const handlers = {
|
||||||
<div
|
onClick,
|
||||||
onClick={onClick}
|
onDoubleClick: () => mutate({ list: 'favorite', value: true }),
|
||||||
onDoubleClick={() => mutate({ list: 'favorite', value: true })}
|
className: 'absolute left-0 top-0 size-full'
|
||||||
className='absolute left-0 top-0 size-full'
|
};
|
||||||
/>
|
|
||||||
);
|
if (!href) return <div {...handlers} />;
|
||||||
|
|
||||||
|
return <Link {...handlers} href={href} prefetch={false} aria-label={show.title} />;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default Handlers;
|
export default Handlers;
|
||||||
@@ -6,6 +6,7 @@ import Handlers from './components/Handlers';
|
|||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
show: Show;
|
show: Show;
|
||||||
|
href?: string;
|
||||||
onClick?: () => void;
|
onClick?: () => void;
|
||||||
className?: string;
|
className?: string;
|
||||||
lazy?: boolean;
|
lazy?: boolean;
|
||||||
@@ -14,7 +15,7 @@ interface Props {
|
|||||||
|
|
||||||
type FetchPriorityProps = ImgHTMLAttributes<HTMLImageElement> & { fetchPriority?: 'high' | 'low' | 'auto' };
|
type FetchPriorityProps = ImgHTMLAttributes<HTMLImageElement> & { fetchPriority?: 'high' | 'low' | 'auto' };
|
||||||
|
|
||||||
const Poster: FC<Props> = ({ show, onClick, className, lazy = true, priority = false }) => {
|
const Poster: FC<Props> = ({ show, href, onClick, className, lazy = true, priority = false }) => {
|
||||||
const fetchPriorityProps: FetchPriorityProps = priority ? { fetchPriority: 'high' } : {};
|
const fetchPriorityProps: FetchPriorityProps = priority ? { fetchPriority: 'high' } : {};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@@ -38,7 +39,7 @@ const Poster: FC<Props> = ({ show, onClick, className, lazy = true, priority = f
|
|||||||
{...fetchPriorityProps}
|
{...fetchPriorityProps}
|
||||||
/>
|
/>
|
||||||
</picture>
|
</picture>
|
||||||
<Handlers show={show} onClick={onClick} />
|
<Handlers show={show} href={href} onClick={onClick} />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,12 +1,10 @@
|
|||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import { FC, ReactNode } from 'react';
|
import { FC, ReactNode } from 'react';
|
||||||
import { create, InstanceProps } from 'react-modal-promise';
|
|
||||||
|
|
||||||
import Poster from '@/components/Poster';
|
import Poster from '@/components/Poster';
|
||||||
import Credits from '@/components/Preview/components/Credits';
|
import Credits from '@/components/Preview/components/Credits';
|
||||||
import useDetails from '@/components/Preview/useDetails';
|
import useDetails from '@/components/Preview/useDetails';
|
||||||
import { Modal } from '@/components/ui/dialog';
|
|
||||||
import { cn } from '@/lib/utils';
|
import { cn } from '@/lib/utils';
|
||||||
|
|
||||||
import Actions from './components/Actions';
|
import Actions from './components/Actions';
|
||||||
@@ -19,7 +17,7 @@ interface Props {
|
|||||||
showId?: Show['id'];
|
showId?: Show['id'];
|
||||||
className?: string;
|
className?: string;
|
||||||
posterClassName?: string;
|
posterClassName?: string;
|
||||||
onClose?: () => void;
|
modal?: boolean;
|
||||||
poster?: ReactNode;
|
poster?: ReactNode;
|
||||||
externalLink?: boolean;
|
externalLink?: boolean;
|
||||||
}
|
}
|
||||||
@@ -30,7 +28,7 @@ const Preview: FC<Props> = ({
|
|||||||
showId,
|
showId,
|
||||||
className,
|
className,
|
||||||
posterClassName,
|
posterClassName,
|
||||||
onClose,
|
modal,
|
||||||
poster,
|
poster,
|
||||||
externalLink = true
|
externalLink = true
|
||||||
}) => {
|
}) => {
|
||||||
@@ -40,7 +38,7 @@ const Preview: FC<Props> = ({
|
|||||||
|
|
||||||
const show: Show & Partial<Details> = (detailedShow || baseShow)!;
|
const show: Show & Partial<Details> = (detailedShow || baseShow)!;
|
||||||
|
|
||||||
const isModal = Boolean(onClose);
|
const isModal = Boolean(modal);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
@@ -76,24 +74,11 @@ const Preview: FC<Props> = ({
|
|||||||
{show.overview}
|
{show.overview}
|
||||||
</p>
|
</p>
|
||||||
<div className='order-5 mt-5 grid grid-cols-1 rounded-lg md:order-5 md:mt-auto'>
|
<div className='order-5 mt-5 grid grid-cols-1 rounded-lg md:order-5 md:mt-auto'>
|
||||||
<Credits showType={show.type} showId={show.id} onClick={onClose} />
|
<Credits showType={show.type} showId={show.id} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const showPreviewModal = create(({ onResolve, onClose, show }: Props & InstanceProps<void>) => (
|
|
||||||
<Modal className='block bg-background p-0 md:bg-black' onClose={onResolve}>
|
|
||||||
<Preview
|
|
||||||
show={show}
|
|
||||||
onClose={() => {
|
|
||||||
onClose?.();
|
|
||||||
onResolve();
|
|
||||||
window.scrollTo({ top: 0, behavior: 'smooth' });
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</Modal>
|
|
||||||
));
|
|
||||||
|
|
||||||
export default Preview;
|
export default Preview;
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
import { atom } from 'jotai';
|
||||||
|
|
||||||
|
export const previewSeedAtom = atom<Show | null>(null);
|
||||||
@@ -1,16 +1,20 @@
|
|||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import { FC } from 'react';
|
import { FC } from 'react';
|
||||||
|
import { useSetAtom } from 'jotai';
|
||||||
|
|
||||||
import Poster from '@/components/Poster';
|
import Poster from '@/components/Poster';
|
||||||
import { showPreviewModal } from '@/components/Preview';
|
import { previewSeedAtom } from '@/components/Preview/seed';
|
||||||
import ScrollNavigation from '@/components/ScrollNavigation';
|
import ScrollNavigation from '@/components/ScrollNavigation';
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
shows: Show[];
|
shows: Show[];
|
||||||
}
|
}
|
||||||
|
|
||||||
const Gallery: FC<Props> = ({ shows }) => (
|
const Gallery: FC<Props> = ({ shows }) => {
|
||||||
|
const setPreviewSeed = useSetAtom(previewSeedAtom);
|
||||||
|
|
||||||
|
return (
|
||||||
<ScrollNavigation<HTMLUListElement>>
|
<ScrollNavigation<HTMLUListElement>>
|
||||||
{({ setScrollElement }) => (
|
{({ setScrollElement }) => (
|
||||||
<ul
|
<ul
|
||||||
@@ -24,7 +28,8 @@ const Gallery: FC<Props> = ({ shows }) => (
|
|||||||
<Poster
|
<Poster
|
||||||
className='!h-[350px] !w-[230px] text-sm'
|
className='!h-[350px] !w-[230px] text-sm'
|
||||||
show={show}
|
show={show}
|
||||||
onClick={() => showPreviewModal({ show })}
|
href={`/${show.type}/${show.id}`}
|
||||||
|
onClick={() => setPreviewSeed(show)}
|
||||||
/>
|
/>
|
||||||
</li>
|
</li>
|
||||||
))}
|
))}
|
||||||
@@ -32,5 +37,6 @@ const Gallery: FC<Props> = ({ shows }) => (
|
|||||||
)}
|
)}
|
||||||
</ScrollNavigation>
|
</ScrollNavigation>
|
||||||
);
|
);
|
||||||
|
};
|
||||||
|
|
||||||
export default Gallery;
|
export default Gallery;
|
||||||
Reference in new issue
Block a user