RWKV-Runner/frontend/src/main.tsx

26 lines
594 B
TypeScript
Raw Normal View History

2023-11-07 19:27:21 +08:00
import './webWails';
2023-05-13 20:15:18 +08:00
import React from 'react';
2023-05-22 10:52:06 +08:00
import { createRoot } from 'react-dom/client';
2023-05-19 15:40:17 +08:00
import './style.scss';
2023-05-15 21:55:57 +08:00
import 'react-toastify/dist/ReactToastify.css';
2023-05-13 20:15:18 +08:00
import App from './App';
2023-05-22 10:52:06 +08:00
import { HashRouter } from 'react-router-dom';
import { startup } from './startup';
2023-05-18 19:25:13 +08:00
import './_locales/i18n-react';
2023-06-04 11:53:50 +08:00
import { WindowShow } from '../wailsjs/runtime';
2023-05-03 23:38:54 +08:00
2023-05-13 20:15:18 +08:00
startup().then(() => {
const container = document.getElementById('root');
2023-05-03 23:38:54 +08:00
2023-05-13 20:15:18 +08:00
const root = createRoot(container!);
2023-05-03 23:38:54 +08:00
2023-05-13 20:15:18 +08:00
root.render(
2023-05-04 23:55:24 +08:00
<HashRouter>
2023-05-22 10:52:06 +08:00
<App />
2023-05-04 23:55:24 +08:00
</HashRouter>
2023-05-13 20:15:18 +08:00
);
// force display the window
2023-06-04 11:53:50 +08:00
WindowShow();
2023-05-13 20:15:18 +08:00
});