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
+231
-127
No files matched your search
@@ -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;
|
||||
Reference in new issue
Block a user