36 lines
863 B
React
36 lines
863 B
React
/** @format */
|
|
|
|
import React from "react";
|
|
import ReactDOM from "react-dom/client";
|
|
|
|
import { BrowserRouter as Router } from "react-router-dom";
|
|
|
|
import { invoke } from "@tauri-apps/api/tauri";
|
|
|
|
import App from "./App";
|
|
|
|
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
|
|
|
|
import store from "./store";
|
|
import { Provider } from "react-redux";
|
|
|
|
const queryClient = new QueryClient();
|
|
|
|
ReactDOM.createRoot(document.getElementById("root")).render(
|
|
<React.StrictMode>
|
|
<QueryClientProvider client={queryClient}>
|
|
<Provider store={store}>
|
|
<Router>
|
|
<App />
|
|
</Router>
|
|
</Provider>
|
|
</QueryClientProvider>
|
|
</React.StrictMode>,
|
|
);
|
|
|
|
document.addEventListener("DOMContentLoaded", () => {
|
|
// This will wait for the window to load, but you could
|
|
// run this function on whatever trigger you want
|
|
invoke("close_splashscreen");
|
|
});
|