2025-12-11 10:40:55 +01:00
|
|
|
/*
|
2026-01-12 15:00:36 +01:00
|
|
|
* Copyright (c) 2026 by Christian Kellner.
|
2025-12-11 10:40:55 +01:00
|
|
|
* Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause
|
|
|
|
|
*/
|
|
|
|
|
|
2021-01-21 16:09:23 +01:00
|
|
|
import { HashRouter } from 'react-router-dom';
|
2022-12-19 21:10:00 +01:00
|
|
|
import { createRoot } from 'react-dom/client';
|
2026-01-22 16:09:36 +01:00
|
|
|
import en_US from '@douyinfe/semi-ui-19/lib/es/locale/source/en_US';
|
2026-04-27 15:58:41 +02:00
|
|
|
import { LocaleProvider, semiGlobal } from '@douyinfe/semi-ui-19';
|
2025-09-03 09:45:09 +02:00
|
|
|
import App from './App';
|
|
|
|
|
import './Index.less';
|
2023-03-20 08:52:13 +01:00
|
|
|
|
2026-04-27 15:58:41 +02:00
|
|
|
// Semi UI uses react-dom (not react-dom/client) internally for imperative renders
|
|
|
|
|
// like Toast, Notification, etc. In React 19, createRoot was removed from react-dom
|
2026-04-27 16:56:04 +02:00
|
|
|
// and lives only in react-dom/client - inject it so Toast can create its own root.
|
2026-04-27 15:58:41 +02:00
|
|
|
semiGlobal.config.createRoot = createRoot;
|
|
|
|
|
|
2022-12-19 21:10:00 +01:00
|
|
|
const container = document.getElementById('fredy');
|
|
|
|
|
const root = createRoot(container);
|
2021-01-21 16:09:23 +01:00
|
|
|
|
2022-12-19 21:10:00 +01:00
|
|
|
root.render(
|
2025-09-18 20:09:11 +02:00
|
|
|
<HashRouter>
|
|
|
|
|
<LocaleProvider locale={en_US}>
|
|
|
|
|
<App />
|
|
|
|
|
</LocaleProvider>
|
|
|
|
|
</HashRouter>,
|
2021-01-21 16:09:23 +01:00
|
|
|
);
|