|
| 1 | +import { HomeIcon } from "@heroicons/react/20/solid"; |
1 | 2 | import { isRouteErrorResponse, useRouteError } from "@remix-run/react";
|
| 3 | +import { friendlyErrorDisplay } from "~/utils/httpErrors"; |
| 4 | +import logoGlow from "../assets/images/logo-glow.png"; |
2 | 5 | import { LinkButton } from "./primitives/Buttons";
|
3 | 6 | import { Header1, Header3 } from "./primitives/Headers";
|
4 |
| -import { friendlyErrorDisplay } from "~/utils/httpErrors"; |
5 | 7 |
|
6 | 8 | type ErrorDisplayOptions = {
|
7 | 9 | button?: {
|
@@ -39,11 +41,20 @@ type DisplayOptionsProps = {
|
39 | 41 |
|
40 | 42 | export function ErrorDisplay({ title, message, button }: DisplayOptionsProps) {
|
41 | 43 | return (
|
42 |
| - <div className="p-4"> |
43 |
| - <Header1 className="mb-4 border-b border-charcoal-800 pb-4">{title}</Header1> |
| 44 | + <div className="relative mt-32 flex flex-col items-center gap-6"> |
| 45 | + <div className="pointer-events-none absolute left-1/2 top-[220px] z-20 w-[350px] -translate-x-1/2 animate-[ping-pong-width_10s_ease-in-out_infinite]"> |
| 46 | + <img src={logoGlow} className="h-full w-full object-contain" /> |
| 47 | + </div> |
| 48 | + <div className="pointer-events-none absolute left-1/2 top-[230px] z-10 h-[70px] w-[350px] -translate-x-1/2 bg-background-dimmed" /> |
| 49 | + <iframe |
| 50 | + src="https://my.spline.design/rotatinglogo-dd8c81cb0ec1b9d7d09a7b473b2992e2/" |
| 51 | + width="200px" |
| 52 | + height="300px" |
| 53 | + /> |
| 54 | + <Header1>{title}</Header1> |
44 | 55 | {message && <Header3>{message}</Header3>}
|
45 |
| - <LinkButton to={button ? button.to : "/"} variant="primary/medium" className="mt-8"> |
46 |
| - {button ? button.title : "Home"} |
| 56 | + <LinkButton to={button ? button.to : "/"} variant="primary/medium" LeadingIcon={HomeIcon}> |
| 57 | + {button ? button.title : "Go to homepage"} |
47 | 58 | </LinkButton>
|
48 | 59 | </div>
|
49 | 60 | );
|
|
0 commit comments