feat: add ErrorBoundary for graceful crash recovery
- Catches render errors and shows a styled recovery UI instead of blank white screen - Try Again button re-renders, Reload button refreshes the page - Error details shown in a collapsible pre block - Full i18n support (EN/FR) - Wraps the entire app in main.tsx
This commit is contained in:
@@ -1,10 +1,13 @@
|
||||
import React from 'react'
|
||||
import ReactDOM from 'react-dom/client'
|
||||
import App from './App'
|
||||
import { ErrorBoundary } from './components/ErrorBoundary'
|
||||
import './index.css'
|
||||
|
||||
ReactDOM.createRoot(document.getElementById('root')!).render(
|
||||
<React.StrictMode>
|
||||
<App />
|
||||
<ErrorBoundary>
|
||||
<App />
|
||||
</ErrorBoundary>
|
||||
</React.StrictMode>,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user