-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
71 changed files
with
66,189 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { NotionRenderer } from "@/components/notion-renderer"; | ||
import * as kr from "@/content/tutorial/ko/126ce18c-fd83-80a5-8260-d757c56405b2.json"; | ||
import * as en from "@/content/tutorial/en/12ace18c-fd83-8071-b3a5-dd8d21da61cf.json"; | ||
|
||
export const runtime = "edge"; | ||
|
||
export async function generateStaticParams() { | ||
return [{ lang: "ko" }, { lang: "en" }]; | ||
} | ||
|
||
export default function TutorialPage({ params }: { params: { lang: string } }) { | ||
const content = params.lang === "ko" ? kr : en; | ||
const title = content.properties.title.title[0].plain_text; | ||
|
||
return ( | ||
<div className="max-w-4xl mx-auto py-10"> | ||
<NotionRenderer blocks={content.blocks} title={title} /> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
"use client"; | ||
|
||
import { Notion } from "@notionpresso/react"; | ||
|
||
export const NotionRenderer = ({ | ||
blocks, | ||
title, | ||
cover, | ||
}: { | ||
blocks: any[]; | ||
title: string; | ||
cover?: string; | ||
}) => { | ||
return ( | ||
<Notion> | ||
<Notion.Cover src={cover} /> | ||
<Notion.Body> | ||
<Notion.Title title={title} /> | ||
<Notion.Blocks blocks={blocks} /> | ||
</Notion.Body> | ||
</Notion> | ||
); | ||
}; |
Oops, something went wrong.