'use client'; import { usePathname } from 'next/navigation'; import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; import { Button } from '@/components/ui/button'; import { ServerCrash, RefreshCw, Home, ArrowLeft, MessageCircleQuestion, } from 'lucide-react'; import { useRouter } from 'next/navigation'; interface ServerErrorPageProps { title?: string; message?: string; errorCode?: string | number; onRetry?: () => void; showBackButton?: boolean; showHomeButton?: boolean; showContactInfo?: boolean; contactEmail?: string; } export function ServerErrorPage({ title = '서버 오류가 발생했습니다', message = '일시적인 문제가 발생했습니다. 잠시 후 다시 시도해 주세요.', errorCode, onRetry, showBackButton = true, showHomeButton = true, showContactInfo = true, contactEmail = 'admin@company.com', }: ServerErrorPageProps) { const router = useRouter(); const pathname = usePathname(); const handleRetry = () => { if (onRetry) { onRetry(); } else { window.location.reload(); } }; return (
오류 코드: {errorCode}
{message}
문제가 지속되면 관리자에게 문의해 주세요.
발생 위치: {pathname}