Skip to content

Commit

Permalink
not found handling
Browse files Browse the repository at this point in the history
  • Loading branch information
JayJay1024 committed Sep 23, 2023
1 parent a1b1bb0 commit 5e10f34
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 8 deletions.
18 changes: 10 additions & 8 deletions packages/apps/src/app/error.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,16 @@ export default function Error({ error, reset }: { error: Error; reset: () => voi
}, [error]);

return (
<main className="app-main gap-middle flex flex-col items-center justify-center">
<h2 className="text-base font-medium text-white">Oops, something went wrong !</h2>
<button
onClick={reset}
className="px-large py-small rounded text-sm font-normal text-white transition-colors hover:bg-white/10"
>
Try again
</button>
<main className="app-main flex items-center justify-center">
<div className="gap-middle flex w-fit flex-col items-start">
<h2 className="text-base font-medium text-white">Oops, something went wrong !</h2>
<button
onClick={reset}
className="px-large py-small rounded text-sm font-normal text-white transition-colors hover:bg-white/10"
>
Try again
</button>
</div>
</main>
);
}
15 changes: 15 additions & 0 deletions packages/apps/src/app/not-found.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import Link from "next/link";

export default function NotFound() {
return (
<main className="app-main flex items-center justify-center">
<div className="gap-middle flex w-fit flex-col items-start">
<h2 className="text-base font-medium text-white">Not Found !</h2>
<p className="text-sm font-normal text-white">Could not find requested resource</p>
<Link href="/" className="text-primary text-sm font-normal hover:underline">
Return Home
</Link>
</div>
</main>
);
}

0 comments on commit 5e10f34

Please sign in to comment.