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}
  • + ))}