-
-
Notifications
You must be signed in to change notification settings - Fork 40
Expand file tree
/
Copy pathmain.tsx
More file actions
21 lines (19 loc) · 651 Bytes
/
main.tsx
File metadata and controls
21 lines (19 loc) · 651 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import React from "react";
import ReactDOM from "react-dom/client";
import App from "./App";
import "./index.css";
import { QueryClientProvider } from "@tanstack/react-query";
import { prefetchUseDefaultServiceFindPets } from "../openapi/queries/prefetch";
import { queryClient } from "./queryClient";
async function PrefetchData() {
await prefetchUseDefaultServiceFindPets(queryClient);
}
PrefetchData().then(() => {
ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render(
<React.StrictMode>
<QueryClientProvider client={queryClient}>
<App />
</QueryClientProvider>
</React.StrictMode>,
);
});