forked from transitive-bullshit/nextjs-notion-starter-kit
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathPage404.tsx
39 lines (32 loc) · 909 Bytes
/
Page404.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import * as React from 'react'
import * as types from '@/lib/types'
import { PageHead } from './PageHead'
import styles from './styles.module.css'
export const Page404: React.FC<types.PageProps> = ({ site, pageId, error }) => {
const title = site?.name || 'Notion Page Not Found'
return (
<>
<PageHead site={site} title={title} />
<div className={styles.container}>
<main className={styles.main}>
<h1>Notion Page Not Found</h1>
{error ? (
<p>{error.message}</p>
) : (
pageId && (
<p>
Make sure that Notion page "{pageId}" is publicly
accessible.
</p>
)
)}
<img
src='/404.png'
alt='404 Not Found'
className={styles.errorImage}
/>
</main>
</div>
</>
)
}