Tonight
This commit is contained in:
parent
28323f145e
commit
94f9c0d594
76 changed files with 3238 additions and 1230 deletions
|
|
@ -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 />);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue