"use client"; import { Component, type ReactNode } from "react"; type Props = { children: ReactNode }; type State = { error: Error | null }; export class ErrorBoundary extends Component { state: State = { error: null }; static getDerivedStateFromError(error: Error) { return { error }; } componentDidCatch(error: Error, info: React.ErrorInfo) { if (process.env.NODE_ENV === "development") { console.error("[aeris] Uncaught error:", error, info.componentStack); } } render() { if (this.state.error) { return (

Something went wrong

{this.state.error.message}

); } return this.props.children; } }