feat(seo): crawlable show links, intercepted preview modal, real 404s

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
nerandClaude Fable 5 committed 2026-08-07 16:33:59 +03:00
1 parent 919dcf9a42
commit 25a5d535a4
21 files changed
+231 -127

No files matched your search

+11
View File
@@ -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;
+11
View File
@@ -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;
+5
View File
@@ -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;
+3
View File
@@ -0,0 +1,3 @@
const Default = () => null;
export default Default;
+4
View File
@@ -0,0 +1,4 @@
// Matches the root route so the preview modal unmounts when navigating home.
const Empty = () => null;
export default Empty;
+29
View File
@@ -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;