Skip to content

Commit 0bee3e5

Browse files
committed
logo
1 parent bd47adc commit 0bee3e5

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

app/about/page.tsx

+8
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,13 @@ export default async function AboutPage({
1111
}) {
1212
const pageid = process.env.ABOUT_PAGE;
1313

14+
// Check if pageid is defined before using it
15+
if (!pageid) {
16+
// Handle the case when pageid is undefined
17+
console.error("ABOUT_PAGE is not defined");
18+
return null; // or return an error message or redirect, depending on your logic
19+
}
20+
1421
// Fetching blockMap
1522
const response = await fetch(`https://notion-api.splitbee.io/v1/page/${pageid}`, {
1623
next: { revalidate: 60 },
@@ -19,6 +26,7 @@ export default async function AboutPage({
1926

2027
// Fetching pageProperties
2128
const pageProperties = await notion.pages.retrieve({ page_id: pageid });
29+
2230
const postDetails = convertToPost(pageProperties);
2331

2432
return (

0 commit comments

Comments
 (0)