Skip to content

Commit 8218841

Browse files
committed
feat: add title when page not found
1 parent 7a0fdf9 commit 8218841

File tree

1 file changed

+24
-17
lines changed

1 file changed

+24
-17
lines changed

pages/404.js

Lines changed: 24 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,31 @@
11
import Link from '@/components/Link'
2+
import { PageSEO } from '@/components/SEO'
3+
import siteMetadata from '@/data/siteMetadata'
24

35
export default function FourZeroFour() {
46
return (
5-
<div className="flex flex-col items-start justify-start md:mt-24 md:flex-row md:items-center md:justify-center md:space-x-6">
6-
<div className="space-x-2 pt-6 pb-8 md:space-y-5">
7-
<h1 className="text-6xl font-extrabold leading-9 tracking-tight text-gray-900 dark:text-gray-100 md:border-r-2 md:px-6 md:text-8xl md:leading-14">
8-
404
9-
</h1>
7+
<>
8+
<PageSEO title={`Page Not Found - ${siteMetadata.title}`} />
9+
<div className="flex flex-col items-start justify-start md:mt-24 md:flex-row md:items-center md:justify-center md:space-x-6">
10+
<div className="space-x-2 pt-6 pb-8 md:space-y-5">
11+
<h1 className="text-6xl font-extrabold leading-9 tracking-tight text-gray-900 dark:text-gray-100 md:border-r-2 md:px-6 md:text-8xl md:leading-14">
12+
404
13+
</h1>
14+
</div>
15+
<div className="max-w-md">
16+
<p className="mb-4 text-xl font-bold leading-normal md:text-2xl">
17+
Sorry we couldn't find this page.
18+
</p>
19+
<p className="mb-8">
20+
But dont worry, you can find plenty of other things on our homepage.
21+
</p>
22+
<Link href="/">
23+
<button className="focus:shadow-outline-blue inline rounded-lg border border-transparent bg-blue-600 px-4 py-2 text-sm font-medium leading-5 text-white shadow transition-colors duration-150 hover:bg-blue-700 focus:outline-none dark:hover:bg-blue-500">
24+
Back to homepage
25+
</button>
26+
</Link>
27+
</div>
1028
</div>
11-
<div className="max-w-md">
12-
<p className="mb-4 text-xl font-bold leading-normal md:text-2xl">
13-
Sorry we couldn't find this page.
14-
</p>
15-
<p className="mb-8">But dont worry, you can find plenty of other things on our homepage.</p>
16-
<Link href="/">
17-
<button className="focus:shadow-outline-blue inline rounded-lg border border-transparent bg-blue-600 px-4 py-2 text-sm font-medium leading-5 text-white shadow transition-colors duration-150 hover:bg-blue-700 focus:outline-none dark:hover:bg-blue-500">
18-
Back to homepage
19-
</button>
20-
</Link>
21-
</div>
22-
</div>
29+
</>
2330
)
2431
}

0 commit comments

Comments
 (0)