diff --git a/src/app/pdf/[contentId]/page.tsx b/src/app/pdf/[contentId]/page.tsx new file mode 100644 index 000000000..a80245598 --- /dev/null +++ b/src/app/pdf/[contentId]/page.tsx @@ -0,0 +1,21 @@ +import { NotionAPI } from 'notion-client'; +import db from '@/db'; +const notion = new NotionAPI(); +import PrintNotes from '@/components/print/PrintNotes'; + +export default async function PrintNotion({ + params: { contentId }, +}: { + params: { contentId: string }; +}) { + const notionMetadata = await db.notionMetadata.findFirst({ + where: { + contentId: parseInt(contentId, 10), + }, + }); + + if (notionMetadata?.notionId) { + const recordMap = await notion.getPage(notionMetadata?.notionId); + return ; + } +} diff --git a/src/components/Appbar.tsx b/src/components/Appbar.tsx index 369e7863b..ac241d7f5 100644 --- a/src/components/Appbar.tsx +++ b/src/components/Appbar.tsx @@ -21,7 +21,7 @@ export const Appbar = () => { const currentPath = usePathname(); return ( <> -