2019-11-16 12:46:19 -08:00
|
|
|
import React from 'react';
|
2026-10-05 18:10:18 -04:00
|
|
|
import { createRoot } from 'react-dom/client';
|
2019-06-11 23:12:03 -07:00
|
|
|
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();
|
2022-06-11 14:04:09 -04:00
|
|
|
|
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);
|
2019-06-09 17:29:10 -07:00
|
|
|
|
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
|
|
|
);
|
|
|
|
|
}
|