{displayStatusCode}
{errorTitle ? errorTitle : statusCode === 404 ? "Sorry, we couldn't find your page." : "Oops, something went wrong."}
{errorDescription && ({errorDescription}
)} {error && ({error.message}
import type { NextPageContext } from "next"; import Link from "next/link"; import { Logo } from "@/components/shared/logo"; import { buttonVariants } from "@/components/ui/button"; import { useWhitelabelingPublic } from "@/utils/hooks/use-whitelabeling"; interface Props { statusCode: number; error?: Error; } export default function Custom404({ statusCode, error }: Props) { const displayStatusCode = statusCode || 400; const { config: whitelabeling } = useWhitelabelingPublic(); const appName = whitelabeling?.appName || "Dokploy"; const logoUrl = whitelabeling?.logoUrl || undefined; const errorTitle = whitelabeling?.errorPageTitle; const errorDescription = whitelabeling?.errorPageDescription; return (
{errorTitle ? errorTitle : statusCode === 404 ? "Sorry, we couldn't find your page." : "Oops, something went wrong."}
{errorDescription && ({errorDescription}
)} {error && ({error.message}