feat(frontend): add styled 404 and error pages

This commit is contained in:
2026-05-29 01:20:32 +02:00
parent 7ed639c9ea
commit 00996327fb
2 changed files with 50 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
"use client";
import { useEffect } from "react";
import { Button } from "@/components/ui/button";
export default function Error({
error,
reset,
}: {
error: Error & { digest?: string };
reset: () => void;
}) {
useEffect(() => {
console.error(error);
}, [error]);
return (
<div className="min-h-[80vh] flex items-center justify-center px-4">
<div className="glass-effect glossy-effect bottom rounded-2xl shadow-fa-lg p-10 text-center max-w-sm w-full">
<p className="text-6xl font-black text-muted-foreground/30 mb-4">Oops</p>
<h1 className="text-xl font-bold mb-2">Something went wrong</h1>
<p className="text-sm text-muted-foreground mb-8">
An unexpected error occurred. Try again or come back later.
</p>
<Button onClick={reset} className="rounded-full">
Try again
</Button>
</div>
</div>
);
}

View File

@@ -0,0 +1,19 @@
import Link from "next/link";
import { Button } from "@/components/ui/button";
export default function NotFound() {
return (
<div className="min-h-[80vh] flex items-center justify-center px-4">
<div className="glass-effect glossy-effect bottom rounded-2xl shadow-fa-lg p-10 text-center max-w-sm w-full">
<p className="text-6xl font-black text-muted-foreground/30 mb-4">404</p>
<h1 className="text-xl font-bold mb-2">Page not found</h1>
<p className="text-sm text-muted-foreground mb-8">
This page doesn&apos;t exist or was moved.
</p>
<Button asChild className="rounded-full">
<Link href="/">Go home</Link>
</Button>
</div>
</div>
);
}