From 5a63e6dad2f7d43617039505c728857ab570fd68 Mon Sep 17 00:00:00 2001 From: Anmol Singh Bhatia <121005188+anmolsinghbhatia@users.noreply.github.com> Date: Wed, 10 Sep 2025 00:03:39 +0530 Subject: [PATCH] [WEB-4858] chore: error page ui revamp #7747 --- apps/web/app/error.tsx | 87 +++++++++++++++++++++++++----------------- 1 file changed, 53 insertions(+), 34 deletions(-) diff --git a/apps/web/app/error.tsx b/apps/web/app/error.tsx index 565c362d5..9853dc13e 100644 --- a/apps/web/app/error.tsx +++ b/apps/web/app/error.tsx @@ -1,14 +1,17 @@ "use client"; -import Link from "next/link"; +import Image from "next/image"; +import { useTheme } from "next-themes"; // plane imports import { API_BASE_URL } from "@plane/constants"; -import { Button, TOAST_TYPE, getButtonStyling, setToast } from "@plane/ui"; -import { cn } from "@plane/utils"; +import { Button, TOAST_TYPE, setToast } from "@plane/ui"; // hooks import { useAppRouter } from "@/hooks/use-app-router"; // layouts import DefaultLayout from "@/layouts/default-layout"; +// images +import maintenanceModeDarkModeImage from "@/public/instance/maintenance-mode-dark.svg"; +import maintenanceModeLightModeImage from "@/public/instance/maintenance-mode-light.svg"; // services import { AuthService } from "@/services/auth.service"; @@ -16,7 +19,10 @@ import { AuthService } from "@/services/auth.service"; const authService = new AuthService(); export default function CustomErrorComponent() { + // routers const router = useAppRouter(); + // hooks + const { resolvedTheme } = useTheme(); const handleSignOut = async () => { await authService @@ -31,39 +37,52 @@ export default function CustomErrorComponent() { .finally(() => router.push("/")); }; + // derived values + const maintenanceModeImage = resolvedTheme === "dark" ? maintenanceModeDarkModeImage : maintenanceModeLightModeImage; + return ( -
-
-
-
-

Yikes! That doesn{"'"}t look good.

-

- That crashed Plane, pun intended. No worries, though. Our engineers have been notified. If you have more - details, please write to{" "} - - support@plane.so - {" "} - or on our{" "} - - Discord - - . -

-
-
- - Go to home - - -
+
+
+ ProjectSettingImg +
+
+
+

+ 🚧 Yikes! That doesn't look good. +

+ + That crashed Plane, pun intended. No worries, though. Our engineers have been notified. If you have more + details, please write to{" "} + + support@plane.so + {" "} + or on our{" "} + + Discord + + . + +
+ +
+ +