forked from transitive-bullshit/nextjs-notion-starter-kit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPage404.tsx
45 lines (37 loc) · 1.04 KB
/
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
40
41
42
43
44
45
import Head from 'next/head'
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} />
<Head>
<meta property='og:site_name' content={title} />
<meta property='og:title' content={title} />
<title>{title}</title>
</Head>
<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>
</>
)
}