Skip to content

Commit 1145602

Browse files
committed
feat!: 💥 ✨ 404 page
1 parent 9023277 commit 1145602

2 files changed

Lines changed: 436 additions & 364 deletions

File tree

‎src/app/not-found.tsx‎

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
"use client";
2+
3+
import { Button } from "@/components/ui/button";
4+
import { StatLink } from "@/components/ui/stat-link";
5+
import { useGameStore } from "@/store/game-store";
6+
import { useEffect } from "react";
7+
8+
export default function NotFound() {
9+
const unlockAchievement = useGameStore((state) => state.unlockAchievement);
10+
11+
useEffect(() => {
12+
unlockAchievement("HOW_DID_WE_GET_HERE")
13+
}, [unlockAchievement]);
14+
15+
return (
16+
<div className="flex flex-col flex-grow w-full items-center justify-center">
17+
<div className="flex flex-col gap-12 items-center">
18+
<h1 className="text-5xl font-bold">
19+
<span className="text-muted-foreground">404 &mdash;</span> Not Found
20+
</h1>
21+
<StatLink href="/">
22+
<Button variant="outline">
23+
Back to safety!
24+
</Button>
25+
</StatLink>
26+
</div>
27+
</div>
28+
)
29+
}

0 commit comments

Comments
 (0)