diff --git a/.changeset/large-months-hang.md b/.changeset/large-months-hang.md new file mode 100644 index 000000000..24b84bf9c --- /dev/null +++ b/.changeset/large-months-hang.md @@ -0,0 +1,5 @@ +--- +'@gitbook/react-openapi': patch +--- + +Fixed scalar api client routing diff --git a/packages/react-openapi/src/OpenAPICodeSample.tsx b/packages/react-openapi/src/OpenAPICodeSample.tsx index 62e8bf41f..3174d3711 100644 --- a/packages/react-openapi/src/OpenAPICodeSample.tsx +++ b/packages/react-openapi/src/OpenAPICodeSample.tsx @@ -119,7 +119,7 @@ export function OpenAPICodeSample(props: { tabs={samples} overlay={ data['x-hideTryItPanel'] || data.operation['x-hideTryItPanel'] ? null : ( - + ) } /> diff --git a/packages/react-openapi/src/ScalarApiButton.tsx b/packages/react-openapi/src/ScalarApiButton.tsx index 21b0b0ed1..f2835e22a 100644 --- a/packages/react-openapi/src/ScalarApiButton.tsx +++ b/packages/react-openapi/src/ScalarApiButton.tsx @@ -6,12 +6,15 @@ import React from 'react'; /** * Button which launches the Scalar API Client */ -export function ScalarApiButton() { +export function ScalarApiButton({ method, path }: { method: string; path: string }) { const client = useApiClientModal(); return (
-