Files
2026-05-23 13:22:10 +03:30

32 lines
1000 B
TypeScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
"use client"; // الزامی برای صفحات خطا
import { useEffect } from "react";
export default function Error({
error,
reset,
}: {
error: Error;
reset: () => void;
}) {
useEffect(() => {
console.error(error); // لاگ کردن خطا برای بررسی
}, [error]);
return (
<div className="flex flex-col items-center justify-center min-h-screen p-4">
<h1 className="text-6xl font-bold text-white">اوپس!</h1>
<h2 className="text-xl font-semibold mt-4 text-neutral-50">مشکلی در سرور رخ داده است</h2>
<p className="text-neutral-300 mt-2 text-center max-w-md">
در حال حاضر امکان پردازش درخواست شما وجود ندارد. لطفاً دوباره تلاش کنید.
</p>
<button
onClick={() => reset()}
className="mt-6 px-6 py-2 bg-white text-blue-900 rounded-lg transition cursor-pointer"
>
تلاش مجدد
</button>
</div>
);
}