mirror of
https://github.com/ourongxing/newsnow.git
synced 2025-01-19 03:09:14 +08:00
16 lines
470 B
TypeScript
16 lines
470 B
TypeScript
import ReactDOM from "react-dom/client"
|
|
import { RouterProvider } from "@tanstack/react-router"
|
|
import { QueryClientProvider } from "@tanstack/react-query"
|
|
import { queryClient, router } from "./main"
|
|
|
|
const rootElement = document.getElementById("app")!
|
|
|
|
if (!rootElement.innerHTML) {
|
|
const root = ReactDOM.createRoot(rootElement)
|
|
root.render(
|
|
<QueryClientProvider client={queryClient}>
|
|
<RouterProvider router={router} />
|
|
</QueryClientProvider>,
|
|
)
|
|
}
|