Skip to content

Commit

Permalink
add 500
Browse files Browse the repository at this point in the history
  • Loading branch information
Vahor committed Apr 28, 2024
1 parent d5f0421 commit 1ede9ba
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 0 deletions.
Binary file added public/error.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/app/500/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import ErrorPage from "../error";

export default ErrorPage;
45 changes: 45 additions & 0 deletions src/app/error.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
"use client";

import A from "@/components/A";
import { TriggerSearch } from "@/components/TriggerSearch";
import { Button } from "@/components/ui/button";
import { GITHUB_REPOSITORY } from "@/lib/constants";
import Image from "next/image";
import Link from "next/link";
import homerError from "../../public/error.gif";

export default function ErrorPage() {
return (
<div className="sm:h-full w-full flex flex-col lg:flex-row gap-8 md:gap-12 items-center sm:justify-center md:mt-[-105px] container">
<Image
src={homerError}
alt="Homer Simpson error"
className="rounded-md shadow"
/>
<main className="flex flex-col gap-4">
<h1 className="font-semibold text-6xl text-black dark:text-white">
Erreur!
</h1>
<div className="text-muted-foreground">
<p>Une erreur s'est produite.</p>
<p>Ce n'est pas de votre faute, c'est de la mienne.</p>
<p className="mt-2">
Si vous voulez m'aider à la corriger, le repository est disponible
sur <A href={GITHUB_REPOSITORY}>GitHub</A>.
</p>
<p className="mt-2">
Et si vous voulez simplement retourner à l'accueil, utilisez les
boutons ci-dessous.
</p>
</div>
<div className="space-x-2">
<Button asChild variant="secondary" className="w-max">
<Link href="/">Returner à l'accueil</Link>
</Button>
<span className="text-sm">ou</span>
<TriggerSearch variant="secondary">Chercher une page</TriggerSearch>
</div>
</main>
</div>
);
}
1 change: 1 addition & 0 deletions src/lib/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const PROTOCOL = env.NEXT_PUBLIC_VERCEL_URL.includes("localhost")
: "https";
export const BASE_URL = `${PROTOCOL}://${env.NEXT_PUBLIC_VERCEL_URL}`;
export const GITHUB_PROFILE = "https://github.com/vahor";
export const GITHUB_REPOSITORY = `${GITHUB_PROFILE}/vahor.fr`;
export const TWITTER_PROFILE = "https://twitter.com/vahor_";
export const LINKEDIN_PROFILE = "https://www.linkedin.com/in/nathan--david/";
export const EMAIL = "me@vahor.fr";
Expand Down

0 comments on commit 1ede9ba

Please sign in to comment.