Files

27 lines
781 B
TypeScript
Raw Permalink Normal View History

import React from 'react';
2026-10-05 18:10:18 -04:00
import { createRoot } from 'react-dom/client';
import App from '@/components/App';
2026-10-05 18:10:18 -04:00
import { queryClient } from '@/api/queryClient';
import { syncThemeColorMeta } from '@/lib/theme';
2026-10-12 07:54:37 -04:00
import { bootTheme } from '@/views/boot';
2026-10-05 18:10:18 -04:00
import '@/router/view-transitions.css';
import { followCurrentUserLanguage } from './i18n';
2019-12-07 11:03:23 -08:00
2026-10-05 18:10:18 -04:00
followCurrentUserLanguage(queryClient);
syncThemeColorMeta();
2026-10-05 18:10:18 -04:00
const container = document.getElementById('app');
2026-10-08 16:53:20 -04:00
2026-10-05 18:10:18 -04:00
if (container) {
const root = createRoot(container);
2026-10-12 16:21:19 -04:00
// Not a top-level await: one in the entry turns off the bundler's chunk merging for the whole build.
void bootTheme().then(() =>
root.render(
<React.StrictMode>
<App />
</React.StrictMode>
)
2026-10-05 18:10:18 -04:00
);
}