diff --git a/apps/web/app/error.tsx b/apps/web/app/error.tsx index 9853dc13e53..7e383ce2bf9 100644 --- a/apps/web/app/error.tsx +++ b/apps/web/app/error.tsx @@ -2,40 +2,36 @@ import Image from "next/image"; import { useTheme } from "next-themes"; -// plane imports -import { API_BASE_URL } from "@plane/constants"; -import { Button, TOAST_TYPE, setToast } from "@plane/ui"; -// hooks -import { useAppRouter } from "@/hooks/use-app-router"; // layouts +import { Button } from "@plane/ui"; +import { useAppRouter } from "@/hooks/use-app-router"; 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"; -// services -const authService = new AuthService(); +const linkMap = [ + { + key: "mail_to", + label: "Contact Support", + value: "mailto:support@plane.so", + }, + { + key: "status", + label: "Status Page", + value: "https://status.plane.so/", + }, + { + key: "twitter_handle", + label: "@planepowers", + value: "https://x.com/planepowers", + }, +]; export default function CustomErrorComponent() { - // routers - const router = useAppRouter(); // hooks const { resolvedTheme } = useTheme(); - - const handleSignOut = async () => { - await authService - .signOut(API_BASE_URL) - .catch(() => - setToast({ - type: TOAST_TYPE.ERROR, - title: "Error!", - message: "Failed to sign out. Please try again.", - }) - ) - .finally(() => router.push("/")); - }; + const router = useAppRouter(); // derived values const maintenanceModeImage = resolvedTheme === "dark" ? maintenanceModeDarkModeImage : maintenanceModeLightModeImage; @@ -55,34 +51,33 @@ export default function CustomErrorComponent() {

- 🚧 Yikes! That doesn't look good. + 🚧 Looks like something went wrong!

- 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 - - . + We track these errors automatically and working on getting things back up and running. If the problem + persists feel free to contact us. In the meantime, try refreshing.
-
+
+ {linkMap.map((link) => ( +
+ + {link.label} + +
+ ))} +
+ +
-