Fehler..
This commit is contained in:
parent
9746fb970d
commit
b63f5f424e
|
|
@ -17,103 +17,107 @@ export default function Error({
|
||||||
}, [error]);
|
}, [error]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="min-h-screen bg-white flex items-center justify-center px-4">
|
<html lang="en">
|
||||||
<div className="max-w-2xl w-full text-center">
|
<body>
|
||||||
{/* Error Icon */}
|
<div className="min-h-screen bg-white flex items-center justify-center px-4">
|
||||||
<div className="mb-8">
|
<div className="max-w-2xl w-full text-center">
|
||||||
<div className="inline-flex items-center justify-center w-24 h-24 bg-red-100 rounded-full mb-6">
|
{/* Error Icon */}
|
||||||
<svg
|
<div className="mb-8">
|
||||||
className="w-12 h-12 text-red-600"
|
<div className="inline-flex items-center justify-center w-24 h-24 bg-red-100 rounded-full mb-6">
|
||||||
fill="none"
|
<svg
|
||||||
stroke="currentColor"
|
className="w-12 h-12 text-red-600"
|
||||||
viewBox="0 0 24 24"
|
fill="none"
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
stroke="currentColor"
|
||||||
>
|
viewBox="0 0 24 24"
|
||||||
<path
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
strokeLinecap="round"
|
>
|
||||||
strokeLinejoin="round"
|
<path
|
||||||
strokeWidth={2}
|
strokeLinecap="round"
|
||||||
d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"
|
strokeLinejoin="round"
|
||||||
/>
|
strokeWidth={2}
|
||||||
</svg>
|
d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"
|
||||||
</div>
|
/>
|
||||||
|
</svg>
|
||||||
|
</div>
|
||||||
|
|
||||||
{/* Error Text */}
|
{/* Error Text */}
|
||||||
<h1 className="text-6xl md:text-8xl font-bold text-gray-900 mb-4">500</h1>
|
<h1 className="text-6xl md:text-8xl font-bold text-gray-900 mb-4">500</h1>
|
||||||
<h2 className="text-2xl md:text-3xl font-semibold text-gray-700 mb-4">
|
<h2 className="text-2xl md:text-3xl font-semibold text-gray-700 mb-4">
|
||||||
Something Went Wrong
|
Something Went Wrong
|
||||||
</h2>
|
</h2>
|
||||||
<p className="text-lg text-gray-600 mb-8 max-w-md mx-auto">
|
<p className="text-lg text-gray-600 mb-8 max-w-md mx-auto">
|
||||||
We're sorry, but something unexpected happened. Our team has been notified and is working on a fix.
|
We're sorry, but something unexpected happened. Our team has been notified and is working on a fix.
|
||||||
</p>
|
|
||||||
|
|
||||||
{/* Error Details (only in development) */}
|
|
||||||
{process.env.NODE_ENV === 'development' && error.message && (
|
|
||||||
<div className="mb-8 p-4 bg-red-50 border border-red-200 rounded-lg text-left">
|
|
||||||
<p className="text-sm font-mono text-red-800 break-all">
|
|
||||||
<strong>Error:</strong> {error.message}
|
|
||||||
</p>
|
</p>
|
||||||
{error.digest && (
|
|
||||||
<p className="text-sm font-mono text-red-600 mt-2">
|
{/* Error Details (only in development) */}
|
||||||
<strong>Digest:</strong> {error.digest}
|
{process.env.NODE_ENV === 'development' && error.message && (
|
||||||
</p>
|
<div className="mb-8 p-4 bg-red-50 border border-red-200 rounded-lg text-left">
|
||||||
|
<p className="text-sm font-mono text-red-800 break-all">
|
||||||
|
<strong>Error:</strong> {error.message}
|
||||||
|
</p>
|
||||||
|
{error.digest && (
|
||||||
|
<p className="text-sm font-mono text-red-600 mt-2">
|
||||||
|
<strong>Digest:</strong> {error.digest}
|
||||||
|
</p>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{/* Action Buttons */}
|
{/* Action Buttons */}
|
||||||
<div className="flex flex-col sm:flex-row gap-4 justify-center items-center">
|
<div className="flex flex-col sm:flex-row gap-4 justify-center items-center">
|
||||||
<Button size="lg" onClick={reset}>
|
<Button size="lg" onClick={reset}>
|
||||||
<svg
|
<svg
|
||||||
className="w-5 h-5 mr-2"
|
className="w-5 h-5 mr-2"
|
||||||
fill="none"
|
fill="none"
|
||||||
stroke="currentColor"
|
stroke="currentColor"
|
||||||
viewBox="0 0 24 24"
|
viewBox="0 0 24 24"
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
>
|
>
|
||||||
<path
|
<path
|
||||||
strokeLinecap="round"
|
strokeLinecap="round"
|
||||||
strokeLinejoin="round"
|
strokeLinejoin="round"
|
||||||
strokeWidth={2}
|
strokeWidth={2}
|
||||||
d="M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"
|
d="M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"
|
||||||
/>
|
/>
|
||||||
</svg>
|
</svg>
|
||||||
Try Again
|
Try Again
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<Link href="/">
|
<Link href="/">
|
||||||
<Button variant="outline" size="lg">
|
<Button variant="outline" size="lg">
|
||||||
<svg
|
<svg
|
||||||
className="w-5 h-5 mr-2"
|
className="w-5 h-5 mr-2"
|
||||||
fill="none"
|
fill="none"
|
||||||
stroke="currentColor"
|
stroke="currentColor"
|
||||||
viewBox="0 0 24 24"
|
viewBox="0 0 24 24"
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
>
|
>
|
||||||
<path
|
<path
|
||||||
strokeLinecap="round"
|
strokeLinecap="round"
|
||||||
strokeLinejoin="round"
|
strokeLinejoin="round"
|
||||||
strokeWidth={2}
|
strokeWidth={2}
|
||||||
d="M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"
|
d="M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"
|
||||||
/>
|
/>
|
||||||
</svg>
|
</svg>
|
||||||
Go Home
|
Go Home
|
||||||
</Button>
|
</Button>
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Help Text */}
|
{/* Help Text */}
|
||||||
<div className="mt-12 pt-8 border-t border-gray-200">
|
<div className="mt-12 pt-8 border-t border-gray-200">
|
||||||
<p className="text-sm text-gray-500">
|
<p className="text-sm text-gray-500">
|
||||||
If this problem persists, please{' '}
|
If this problem persists, please{' '}
|
||||||
<Link href="/#faq" className="text-primary-600 hover:text-primary-700 font-medium">
|
<Link href="/#faq" className="text-primary-600 hover:text-primary-700 font-medium">
|
||||||
check our FAQ
|
check our FAQ
|
||||||
</Link>
|
</Link>
|
||||||
{' '}or contact support.
|
{' '}or contact support.
|
||||||
</p>
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</body>
|
||||||
</div>
|
</html>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import Link from 'next/link';
|
import Link from 'next/link';
|
||||||
import { Button } from '@/components/ui/Button';
|
|
||||||
|
|
||||||
import '@/styles/globals.css';
|
import '@/styles/globals.css';
|
||||||
|
|
||||||
|
|
@ -41,24 +41,22 @@ export default function NotFound() {
|
||||||
|
|
||||||
{/* Action Button */}
|
{/* Action Button */}
|
||||||
<div className="flex justify-center">
|
<div className="flex justify-center">
|
||||||
<Link href="/">
|
<Link href="/" className="inline-flex items-center justify-center px-4 py-2 border border-transparent text-base font-medium rounded-md shadow-sm text-white bg-primary-600 hover:bg-primary-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-500">
|
||||||
<Button size="lg">
|
<svg
|
||||||
<svg
|
className="w-5 h-5 mr-2"
|
||||||
className="w-5 h-5 mr-2"
|
fill="none"
|
||||||
fill="none"
|
stroke="currentColor"
|
||||||
stroke="currentColor"
|
viewBox="0 0 24 24"
|
||||||
viewBox="0 0 24 24"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
>
|
||||||
>
|
<path
|
||||||
<path
|
strokeLinecap="round"
|
||||||
strokeLinecap="round"
|
strokeLinejoin="round"
|
||||||
strokeLinejoin="round"
|
strokeWidth={2}
|
||||||
strokeWidth={2}
|
d="M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"
|
||||||
d="M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"
|
/>
|
||||||
/>
|
</svg>
|
||||||
</svg>
|
Back to Home
|
||||||
Back to Home
|
|
||||||
</Button>
|
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue