|
| 1 | +import { HomeIcon } from "@heroicons/react/20/solid"; |
1 | 2 | import { isRouteErrorResponse, useRouteError } from "@remix-run/react";
|
2 |
| -import { LinkButton } from "./primitives/Buttons"; |
3 |
| -import { Header1, Header3 } from "./primitives/Headers"; |
| 3 | +import { motion } from "framer-motion"; |
4 | 4 | import { friendlyErrorDisplay } from "~/utils/httpErrors";
|
| 5 | +import { LinkButton } from "./primitives/Buttons"; |
| 6 | +import { Header1 } from "./primitives/Headers"; |
| 7 | +import { Paragraph } from "./primitives/Paragraph"; |
5 | 8 |
|
6 | 9 | type ErrorDisplayOptions = {
|
7 | 10 | button?: {
|
@@ -39,12 +42,32 @@ type DisplayOptionsProps = {
|
39 | 42 |
|
40 | 43 | export function ErrorDisplay({ title, message, button }: DisplayOptionsProps) {
|
41 | 44 | return (
|
42 |
| - <div className="p-4"> |
43 |
| - <Header1 className="mb-4 border-b border-charcoal-800 pb-4">{title}</Header1> |
44 |
| - {message && <Header3>{message}</Header3>} |
45 |
| - <LinkButton to={button ? button.to : "/"} variant="primary/medium" className="mt-8"> |
46 |
| - {button ? button.title : "Home"} |
47 |
| - </LinkButton> |
| 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={{ modifiers: ["meta"], key: "g" }} |
| 52 | + variant="primary/medium" |
| 53 | + LeadingIcon={HomeIcon} |
| 54 | + > |
| 55 | + {button ? button.title : "Go to homepage"} |
| 56 | + </LinkButton> |
| 57 | + </div> |
| 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> |
48 | 71 | </div>
|
49 | 72 | );
|
50 | 73 | }
|
0 commit comments