import { StrictMode } from 'react' import { createRoot, hydrateRoot } from 'react-dom/client' import './index.css' import App from './App.tsx' const root = document.getElementById('root')! const app = ( ) const currentPath = window.location.pathname.replace(/\/+$/, '') || '/' if (root.hasChildNodes() && root.dataset.pagePath === currentPath) hydrateRoot(root, app) else createRoot(root).render(app)