Skip to content

404/500 Errors Mobile Responsiveness #111

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 17, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 21 additions & 3 deletions src/components/ErrorMessage.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import ErrorPage from "@/public/error.webp";
import MobileErrorPage from "@/public/mobileError.webp";
import Image from "next/image";
import Button from "./Button";

Expand All @@ -10,11 +11,28 @@ type Props = {
const ErrorMessage = ({ message, details }: Props) => {
return (
<div className="relative h-screen w-full">
<Image src={ErrorPage} alt="Error Page" fill objectFit="cover" priority />
<div className="hidden sm:flex">
<Image
src={ErrorPage}
alt="Error Page"
fill
objectFit="cover"
priority
/>
</div>
<div className="sm:hidden">
<Image
src={MobileErrorPage}
alt="Mobile Error Page"
fill
objectFit="cover"
priority
/>
</div>

<div className="absolute flex h-full w-full flex-col items-center justify-center gap-4">
<div className="flex h-1/5 w-1/5 flex-col place-items-center justify-center gap-4 text-center text-white">
<div className="border-b-4 border-ula-yellow-primary pb-3 text-4xl font-bold xl:text-6xl">
<div className="flex h-1/5 w-1/2 flex-col place-items-center justify-center gap-4 text-center text-white sm:w-1/5">
<div className="border-b-4 border-ula-yellow-primary pb-3 text-5xl font-bold xl:text-6xl">
{message}
</div>
<div className="text-xl xl:text-2xl">{details}</div>
Expand Down
Loading