30 lines
796 B
TypeScript
30 lines
796 B
TypeScript
|
|
"use client";
|
|||
|
|
|
|||
|
|
export default function QrError({
|
|||
|
|
error,
|
|||
|
|
reset,
|
|||
|
|
}: {
|
|||
|
|
error: Error & { digest?: string };
|
|||
|
|
reset: () => void;
|
|||
|
|
}) {
|
|||
|
|
return (
|
|||
|
|
<main
|
|||
|
|
className="flex min-h-svh flex-col items-center justify-center gap-4 bg-[#f5f5f4] p-6 text-center"
|
|||
|
|
dir="rtl"
|
|||
|
|
>
|
|||
|
|
<p className="text-4xl">⚠️</p>
|
|||
|
|
<h1 className="text-lg font-semibold text-foreground">خطا در بارگذاری منو</h1>
|
|||
|
|
<p className="max-w-sm text-sm text-muted-foreground">
|
|||
|
|
{error.message || "صفحه منوی میز قابل نمایش نیست."}
|
|||
|
|
</p>
|
|||
|
|
<button
|
|||
|
|
type="button"
|
|||
|
|
onClick={reset}
|
|||
|
|
className="rounded-lg bg-[#0F6E56] px-4 py-2 text-sm font-medium text-white"
|
|||
|
|
>
|
|||
|
|
تلاش مجدد
|
|||
|
|
</button>
|
|||
|
|
</main>
|
|||
|
|
);
|
|||
|
|
}
|