import React from 'react'; import { Head, Link } from '@inertiajs/react'; interface ErrorPageProps { status: number; } const messages: Record = { 403: { title: 'Access Denied', description: "You don't have permission to access this resource.", }, 404: { title: 'Page Not Found', description: "The page you're looking for doesn't exist or has been moved.", }, 419: { title: 'Session Expired', description: 'Your session has expired. Please refresh and try again.', }, 500: { title: 'Server Error', description: 'Something went wrong on our end. Please try again later.', }, 503: { title: 'Under Maintenance', description: 'The system is temporarily unavailable. Please check back soon.', }, }; export default function ErrorPage({ status }: ErrorPageProps) { const { title, description } = messages[status] ?? { title: 'Unexpected Error', description: 'An unexpected error occurred.', }; return (
{status}
{title}

{description}

{status !== 419 ? ( Back to Dashboard ) : ( )}

Error {status}

); }