mirror of
https://github.com/docmost/docmost.git
synced 2025-11-15 23:51:08 +10:00
40 lines
1.1 KiB
TypeScript
40 lines
1.1 KiB
TypeScript
import "@mantine/core/styles.css";
|
|
import "@mantine/spotlight/styles.css";
|
|
import "@mantine/notifications/styles.css";
|
|
import React from "react";
|
|
import ReactDOM from "react-dom/client";
|
|
import App from "./App.tsx";
|
|
import { theme } from "@/theme";
|
|
import { MantineProvider } from "@mantine/core";
|
|
import { BrowserRouter } from "react-router-dom";
|
|
import { ModalsProvider } from "@mantine/modals";
|
|
import { Notifications } from "@mantine/notifications";
|
|
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
|
|
|
|
export const queryClient = new QueryClient({
|
|
defaultOptions: {
|
|
queries: {
|
|
refetchOnMount: false,
|
|
refetchOnWindowFocus: false,
|
|
retry: false,
|
|
},
|
|
},
|
|
});
|
|
|
|
const root = ReactDOM.createRoot(
|
|
document.getElementById("root") as HTMLElement,
|
|
);
|
|
|
|
root.render(
|
|
<BrowserRouter>
|
|
<MantineProvider theme={theme}>
|
|
<ModalsProvider>
|
|
<QueryClientProvider client={queryClient}>
|
|
<Notifications position="top-right" limit={3} />
|
|
<App />
|
|
</QueryClientProvider>
|
|
</ModalsProvider>
|
|
</MantineProvider>
|
|
</BrowserRouter>,
|
|
);
|