mirror of
https://github.com/christianvidalwolf-prog/CrazeAnalytix.git
synced 2026-08-03 15:15:24 +02:00
Move useMemo before early return in WaterfallModal to comply with Rules of Hooks. Wrap App with ErrorBoundary so future render crashes show an error panel instead of a silent black screen. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
18 lines
448 B
TypeScript
18 lines
448 B
TypeScript
import React from 'react';
|
|
import ReactDOM from 'react-dom/client';
|
|
import App from './App';
|
|
import ErrorBoundary from './components/ErrorBoundary';
|
|
|
|
const rootElement = document.getElementById('root');
|
|
if (!rootElement) {
|
|
throw new Error("Could not find root element to mount to");
|
|
}
|
|
|
|
const root = ReactDOM.createRoot(rootElement);
|
|
root.render(
|
|
<React.StrictMode>
|
|
<ErrorBoundary>
|
|
<App />
|
|
</ErrorBoundary>
|
|
</React.StrictMode>
|
|
); |