"use client" // Error boundaries must be Client Components import { AlertCircle } from "lucide-react" import { useEffect } from "react" import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert" interface ErrorProps { title: string description: string } function ErrorAlert(errorProps: ErrorProps) { return ( {errorProps.title} {errorProps.description} ) } export default function Error({ error, reset }: { error: Error & { digest?: string }; reset: () => void }) { useEffect(() => { // Log the error to an error reporting service console.error(error) }, [error]) return (
) }