// This file is part of Shadcn Admin Kit (https://github.com/marmelab/shadcn-admin-kit) import type { FallbackProps } from "react-error-boundary"; import { useResetErrorBoundaryOnLocationChange, Translate } from "ra-core"; import { CircleAlert, History } from "lucide-react"; import { Accordion, AccordionContent, AccordionItem, AccordionTrigger, } from "@/components/ui/accordion"; import { Button } from "@/components/ui/button"; import type { HtmlHTMLAttributes, ErrorInfo } from "react"; export const Error = (props: InternalErrorProps & {}) => { const { error, errorInfo, resetErrorBoundary, ...rest } = props; useResetErrorBoundaryOnLocationChange(resetErrorBoundary); return (

{process.env.NODE_ENV !== "production" && ( <> {error.message}
{errorInfo?.componentStack}

Need help with this error? Try the following:

)}
); }; interface InternalErrorProps extends Omit, "title">, FallbackProps { className?: string; errorInfo?: ErrorInfo; } export interface ErrorProps extends Pick { errorInfo?: ErrorInfo; } function goBack() { window.history.go(-1); }