"use client"; import { useEffect } from "react"; import { AlertTriangle, RefreshCw } from "lucide-react"; import { Button } from "@/components/ui/button"; import { useI18n } from "@/i18n/i18n-context"; /** * Error boundary scoped to the `/projects` route subtree. Surfaces * failures from the project list query and the connect/edit/delete * mutation hooks if they throw before the inline toast handler runs. */ export default function ProjectsError({ error, reset, }: { error: Error & { digest?: string }; reset: () => void; }) { const { t } = useI18n(); useEffect(() => { console.error("Projects route error:", error); }, [error]); return (

{t("projects.errorTitle")}

{error.message || t("projects.errorDescription")}

); }