From 8788385d4a5ea58a63012b67e33403dbb6b0504f Mon Sep 17 00:00:00 2001 From: 7nohe <7nohe.urata@gmail.com> Date: Tue, 31 Oct 2023 22:56:06 +0900 Subject: [PATCH] chore: format code --- examples/react-app/src/App.tsx | 32 ++++++++-------- src/createExports.ts | 6 ++- src/createImports.ts | 8 +++- src/createSource.ts | 6 +-- src/createUseQuery.ts | 70 +++++++++++++++++----------------- 5 files changed, 63 insertions(+), 59 deletions(-) diff --git a/examples/react-app/src/App.tsx b/examples/react-app/src/App.tsx index 207c618..220db20 100644 --- a/examples/react-app/src/App.tsx +++ b/examples/react-app/src/App.tsx @@ -4,34 +4,33 @@ import { useDefaultClientFindPets, useDefaultClientFindPetsKey, } from "../openapi/queries"; -import { useState } from 'react'; -import { queryClient } from './queryClient'; +import { useState } from "react"; +import { queryClient } from "./queryClient"; function App() { - const [tags, _setTags] = useState([]); const [limit, _setLimit] = useState(10); - const { data, error, refetch } = useDefaultClientFindPets( - { tags, limit }, - ); + const { data, error, refetch } = useDefaultClientFindPets({ tags, limit }); const { mutate: addPet } = useDefaultClientAddPet(); - if (error) return ( -
-

Failed to fetch pets

- -
- ); + if (error) + return ( +
+

Failed to fetch pets

+ +
+ ); return (

Pet List

    - {data instanceof Array && data?.map((pet, index) => ( -
  • {pet.name}
  • - ))} + {data instanceof Array && + data?.map((pet, index) => ( +
  • {pet.name}
  • + ))}