From 4c74add1d6e9e330437abdcc054bd0a05d1dce0b Mon Sep 17 00:00:00 2001
From: Urata Daiki <7nohe@users.noreply.github.com>
Date: Sat, 4 May 2024 02:05:04 +0900
Subject: [PATCH] chore: Remove prefetch function in main.tsx
---
examples/nextjs-app/package.json | 2 +-
examples/react-app/src/main.tsx | 21 +++++++--------------
2 files changed, 8 insertions(+), 15 deletions(-)
diff --git a/examples/nextjs-app/package.json b/examples/nextjs-app/package.json
index 922aa73..864719b 100644
--- a/examples/nextjs-app/package.json
+++ b/examples/nextjs-app/package.json
@@ -9,7 +9,7 @@
"build": "next build",
"start": "next start",
"lint": "next lint",
- "generate:api": "rimraf ./openapi && node ../../dist/cli.mjs -i ./petstore.yaml -c axios --request ./request.ts"
+ "generate:api": "rimraf ./openapi && node ../../dist/cli.mjs -i ./petstore.yaml -c axios --request ./request.ts --format=biome --lint=biome"
},
"dependencies": {
"@tanstack/react-query": "^5.18.1",
diff --git a/examples/react-app/src/main.tsx b/examples/react-app/src/main.tsx
index 947dbff..df3c2b8 100644
--- a/examples/react-app/src/main.tsx
+++ b/examples/react-app/src/main.tsx
@@ -3,19 +3,12 @@ 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(
-
-
-
-
- ,
- );
-});
+ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render(
+
+
+
+
+ ,
+);