-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: replace about and experience sections with v2
- Loading branch information
1 parent
ce5edce
commit bc74123
Showing
8 changed files
with
94 additions
and
10 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
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,26 @@ | ||
import { Container } from "@chakra-ui/react"; | ||
|
||
import { NotionProfilePage } from "./notion-profile-page"; | ||
import { notion } from "../lib/notion"; | ||
import { notionAboutPageId } from "../lib/config"; | ||
|
||
const AboutV2 = async () => { | ||
if (!notionAboutPageId) return null; | ||
|
||
const rootNotionPageId = notionAboutPageId; | ||
const recordMap = await notion.getPage(rootNotionPageId); | ||
|
||
return ( | ||
<Container | ||
minHeight="100vh" | ||
justifyContent="center" | ||
alignItems="center" | ||
display="flex" | ||
pt={50} | ||
> | ||
<NotionProfilePage recordMap={recordMap} rootPageId={rootNotionPageId} /> | ||
</Container> | ||
); | ||
}; | ||
|
||
export default AboutV2; |
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,26 @@ | ||
import { Container } from "@chakra-ui/react"; | ||
|
||
import { NotionProfilePage } from "./notion-profile-page"; | ||
import { notion } from "../lib/notion"; | ||
import { notionExperiencePageId } from "../lib/config"; | ||
|
||
const ExperienceV2 = async () => { | ||
if (!notionExperiencePageId) return null; | ||
|
||
const rootNotionPageId = notionExperiencePageId; | ||
const recordMap = await notion.getPage(rootNotionPageId); | ||
|
||
return ( | ||
<Container | ||
minHeight="100vh" | ||
justifyContent="center" | ||
alignItems="center" | ||
display="flex" | ||
pt={50} | ||
> | ||
<NotionProfilePage recordMap={recordMap} rootPageId={rootNotionPageId} /> | ||
</Container> | ||
); | ||
}; | ||
|
||
export default ExperienceV2; |
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,26 @@ | ||
"use client"; | ||
|
||
import { useColorMode } from "@chakra-ui/react"; | ||
import { NotionRenderer } from "react-notion-x"; | ||
import { ExtendedRecordMap } from "notion-types"; | ||
import "react-notion-x/src/styles.css"; | ||
|
||
export const NotionProfilePage = ({ | ||
recordMap, | ||
rootPageId, | ||
}: { | ||
recordMap: ExtendedRecordMap; | ||
rootPageId: string; | ||
}) => { | ||
const { colorMode } = useColorMode(); | ||
|
||
if (!recordMap) return null; | ||
|
||
return ( | ||
<NotionRenderer | ||
recordMap={recordMap} | ||
darkMode={colorMode === "dark"} | ||
rootPageId={rootPageId} | ||
/> | ||
); | ||
}; |
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
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,7 @@ | ||
export const notionAboutPageId = process.env.NOTION_ABOUT_PAGE_ID; | ||
|
||
export const notionExperiencePageId = process.env.NOTION_EXPERIENCE_PAGE_ID; | ||
|
||
export const notionBlogDatabaseId = process.env.NOTION_BLOG_DATABASE_ID; | ||
|
||
export const notionAuthToken = process.env.NOTION_AUTH_TOKEN; |
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
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
bc74123
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
portfolio-website – ./
portfolio-website-git-main-yutakusuno.vercel.app
portfolio-website-yutakusuno.vercel.app
yutakusuno.vercel.app
yutakusuno.com
www.yutakusuno.com