mirror of
https://github.com/PlayEdu/frontend.git
synced 2025-06-21 09:32:49 +08:00
31 lines
931 B
TypeScript
31 lines
931 B
TypeScript
import React from "react";
|
|
import ReactDOM from "react-dom/client";
|
|
import reportWebVitals from "./reportWebVitals";
|
|
import { BrowserRouter } from "react-router-dom";
|
|
import { ConfigProvider } from "antd";
|
|
import zhCN from "antd/locale/zh_CN";
|
|
import App from "./App";
|
|
import "./index.scss"; //全局样式
|
|
|
|
const root = ReactDOM.createRoot(
|
|
document.getElementById("root") as HTMLElement
|
|
);
|
|
|
|
ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render(
|
|
<React.StrictMode>
|
|
<ConfigProvider
|
|
locale={zhCN}
|
|
theme={{ token: { colorPrimary: "#ff4d4f" } }}
|
|
>
|
|
<BrowserRouter>
|
|
<App />
|
|
</BrowserRouter>
|
|
</ConfigProvider>
|
|
</React.StrictMode>
|
|
);
|
|
|
|
// If you want to start measuring performance in your app, pass a function
|
|
// to log results (for example: reportWebVitals(console.log))
|
|
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
|
|
reportWebVitals();
|