-
-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into collink/update-openapi-ts-version-for-namesp…
…aces
- Loading branch information
Showing
25 changed files
with
666 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
"use client"; | ||
|
||
import { useDefaultServiceFindPaginatedPetsInfinite } from "@/openapi/queries/infiniteQueries"; | ||
import { ReactQueryDevtools } from "@tanstack/react-query-devtools"; | ||
import React from "react"; | ||
|
||
export default function PaginatedPets() { | ||
const { data, fetchNextPage } = useDefaultServiceFindPaginatedPetsInfinite({ | ||
limit: 10, | ||
tags: [], | ||
}); | ||
|
||
return ( | ||
<> | ||
<h1>Pet List with Pagination</h1> | ||
<ul> | ||
{data?.pages.map((group, i) => ( | ||
<React.Fragment key={group.pets?.at(0)?.id}> | ||
{group.pets?.map((pet) => ( | ||
<li key={pet.id}>{pet.name}</li> | ||
))} | ||
</React.Fragment> | ||
))} | ||
</ul> | ||
{data?.pages.at(-1)?.nextPage && ( | ||
<button | ||
type="button" | ||
onClick={() => fetchNextPage()} | ||
className="bg-blue-500 px-4 py-2 text-white mt-4" | ||
> | ||
Load More | ||
</button> | ||
)} | ||
<ReactQueryDevtools initialIsOpen={false} /> | ||
</> | ||
); | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import PaginatedPets from "../components/PaginatedPets"; | ||
|
||
export default async function InfiniteLoaderPage() { | ||
return ( | ||
<main className="flex min-h-screen flex-col items-center justify-between p-24"> | ||
<PaginatedPets /> | ||
</main> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,7 @@ | ||
{ | ||
"name": "@7nohe/openapi-react-query-codegen", | ||
"version": "1.4.1", | ||
"version": "1.5.1", | ||
"description": "OpenAPI React Query Codegen", | ||
"bin": { | ||
"openapi-rq": "dist/cli.mjs" | ||
}, | ||
"type": "module", | ||
"workspaces": ["examples/*"], | ||
"scripts": { | ||
"build": "rimraf dist && tsc -p tsconfig.json", | ||
"lint": "biome check .", | ||
"lint:fix": "biome check --apply .", | ||
"preview": "npm run build && npm -C examples/react-app run generate:api", | ||
"prepublishOnly": "npm run build", | ||
"release": "npx git-ensure -a && npx bumpp --commit --tag --push", | ||
"test": "vitest --coverage.enabled true", | ||
"snapshot": "vitest --update" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/7nohe/openapi-react-query-codegen.git" | ||
}, | ||
"homepage": "https://github.com/7nohe/openapi-react-query-codegen", | ||
"bugs": "https://github.com/7nohe/openapi-react-query-codegen/issues", | ||
"files": ["dist"], | ||
"keywords": [ | ||
"codegen", | ||
"react-query", | ||
|
@@ -34,8 +12,30 @@ | |
"openapi-typescript-codegen", | ||
"@hey-api/openapi-ts" | ||
], | ||
"author": "Daiki Urata (@7nohe)", | ||
"homepage": "https://github.com/7nohe/openapi-react-query-codegen", | ||
"bugs": "https://github.com/7nohe/openapi-react-query-codegen/issues", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/7nohe/openapi-react-query-codegen.git" | ||
}, | ||
"license": "MIT", | ||
"author": "Daiki Urata (@7nohe)", | ||
"type": "module", | ||
"bin": { | ||
"openapi-rq": "dist/cli.mjs" | ||
}, | ||
"files": ["dist"], | ||
"workspaces": ["examples/*"], | ||
"scripts": { | ||
"build": "rimraf dist && tsc -p tsconfig.json", | ||
"lint": "biome check .", | ||
"lint:fix": "biome check --apply .", | ||
"prepublishOnly": "npm run build", | ||
"preview": "npm run build && npm -C examples/react-app run generate:api", | ||
"release": "npx git-ensure -a && npx bumpp --commit --tag --push", | ||
"snapshot": "vitest --update", | ||
"test": "vitest --coverage.enabled true" | ||
}, | ||
"dependencies": { | ||
"@hey-api/openapi-ts": "0.52.0" | ||
}, | ||
|
@@ -58,7 +58,9 @@ | |
"ts-morph": "22.x", | ||
"typescript": "5.x" | ||
}, | ||
"packageManager": "[email protected]", | ||
"engines": { | ||
"node": ">=14" | ||
"node": ">=14", | ||
"pnpm": ">=9" | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.