"use client"; import { useEffect } from "react"; import Link from "next/link"; import { AlertTriangle, Home, RotateCcw } from "lucide-react"; interface ExerciseErrorProps { error: Error & { digest?: string }; reset: () => void; category: string; categoryColor: string; } export function ExerciseError({ error, reset, category, categoryColor, }: ExerciseErrorProps) { useEffect(() => { console.error(`[${category}] Exercise error:`, error); }, [error, category]); return (
{/* Icon */}
{/* Heading */}

{category} hit an error

{error.message || "Something unexpected happened. Give it another shot."}

{error.digest && (

Ref: {error.digest}

)}
{/* Actions */}
Dashboard
); }