import React, { Component, ErrorInfo, ReactNode } from 'react'; import { createRoot } from 'react-dom/client'; import App from './App.tsx'; import { SnackbarProvider } from './context/SnackbarContext.tsx'; import './index.css'; interface Props { children: ReactNode; } interface State { hasError: boolean; error: Error | null; } class ErrorBoundary extends Component { public state: State = { hasError: false, error: null, }; public static getDerivedStateFromError(error: Error): State { return { hasError: true, error }; } public componentDidCatch(error: Error, errorInfo: ErrorInfo) { console.error("Uncaught Error Boundary catch:", error, errorInfo); } public render() { if (this.state.hasError) { return (

Application Startup Notice

An error occurred during application load:

            {this.state.error?.message || "Unknown error"}
          
); } return this.props.children; } } createRoot(document.getElementById('root')!).render( , );