This commit is contained in:
Andras Schmelczer 2026-05-06 22:40:46 +01:00
parent 28323f145e
commit 94f9c0d594
76 changed files with 3238 additions and 1230 deletions

View file

@ -1,6 +1,6 @@
import { createRoot, hydrateRoot } from 'react-dom/client';
import { createRoot } from 'react-dom/client';
import App from './App';
import { INITIAL_LANGUAGE, i18nReady } from './i18n';
import { i18nReady } from './i18n';
import './index.css';
import './hooks/usePlausible';
@ -13,14 +13,10 @@ const root = container;
function renderApp() {
const hasPrerenderedMarkup = root.children.length > 0;
if (hasPrerenderedMarkup && INITIAL_LANGUAGE === 'en') {
hydrateRoot(root, <App />);
return;
}
if (hasPrerenderedMarkup) {
root.textContent = '';
}
root.removeAttribute('data-prerender-path');
createRoot(root).render(<App />);
}