|
1 | 1 | import { HomeIcon } from "@heroicons/react/20/solid";
|
2 | 2 | import { isRouteErrorResponse, useRouteError } from "@remix-run/react";
|
| 3 | +import { motion } from "framer-motion"; |
3 | 4 | import { friendlyErrorDisplay } from "~/utils/httpErrors";
|
4 |
| -import logoGlow from "../assets/images/logo-glow.png"; |
5 | 5 | import { LinkButton } from "./primitives/Buttons";
|
6 |
| -import { Header1, Header3 } from "./primitives/Headers"; |
| 6 | +import { Header1 } from "./primitives/Headers"; |
| 7 | +import { Paragraph } from "./primitives/Paragraph"; |
7 | 8 |
|
8 | 9 | type ErrorDisplayOptions = {
|
9 | 10 | button?: {
|
@@ -41,21 +42,32 @@ type DisplayOptionsProps = {
|
41 | 42 |
|
42 | 43 | export function ErrorDisplay({ title, message, button }: DisplayOptionsProps) {
|
43 | 44 | return (
|
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" /> |
| 45 | + <div className="relative flex min-h-screen flex-col items-center justify-center bg-[#16181C]"> |
| 46 | + <div className="z-10 mt-[30vh] flex flex-col items-center gap-8"> |
| 47 | + <Header1>{title}</Header1> |
| 48 | + {message && <Paragraph>{message}</Paragraph>} |
| 49 | + <LinkButton |
| 50 | + to={button ? button.to : "/"} |
| 51 | + // shortcut={{ key: "h" }} |
| 52 | + variant="primary/medium" |
| 53 | + LeadingIcon={HomeIcon} |
| 54 | + > |
| 55 | + {button ? button.title : "Go to homepage"} |
| 56 | + </LinkButton> |
47 | 57 | </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> |
55 |
| - {message && <Header3>{message}</Header3>} |
56 |
| - <LinkButton to={button ? button.to : "/"} variant="primary/medium" LeadingIcon={HomeIcon}> |
57 |
| - {button ? button.title : "Go to homepage"} |
58 |
| - </LinkButton> |
| 58 | + <div className="pointer-events-none absolute bottom-4 right-4 z-10 h-[70px] w-[200px] bg-[rgb(24,26,30)]" /> |
| 59 | + <motion.div |
| 60 | + className="pointer-events-none absolute inset-0 overflow-hidden" |
| 61 | + initial={{ opacity: 0 }} |
| 62 | + animate={{ opacity: 1 }} |
| 63 | + transition={{ delay: 0.5, duration: 2, ease: "easeOut" }} |
| 64 | + > |
| 65 | + <iframe |
| 66 | + src="https://my.spline.design/untitled-a6f70b5ebc46bdb2dcc0f21d5397e8ac/" |
| 67 | + className="pointer-events-none absolute inset-0 h-full w-full object-cover" |
| 68 | + style={{ border: "none" }} |
| 69 | + /> |
| 70 | + </motion.div> |
59 | 71 | </div>
|
60 | 72 | );
|
61 | 73 | }
|
0 commit comments