Skip to content

Commit 1391b2b

Browse files
committed
chore: better endpoint handling
1 parent 772218e commit 1391b2b

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

components/ApiReference/ApiReferenceMethod/ApiReferenceMethod.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ function ApiReferenceMethod({ methodName, methodType, endpoint }: Props) {
5252

5353
<Endpoint
5454
method={methodType.toUpperCase()}
55-
path={endpoint}
55+
path={`${baseUrl}${endpoint}`}
5656
name={methodName}
5757
/>
5858

components/Endpoints.tsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ const Endpoints = ({ children, title = "Endpoints" }) => (
1515
);
1616

1717
const EndpointText = ({ method, path }) => (
18-
<>
18+
<div className="flex items-center">
1919
<span
2020
className={cn({
21-
"text-xs font-medium text-gray-600 dark:text-gray-300 border border-transparent font-mono rounded p-1 center mr-3":
21+
"text-xs font-medium text-gray-600 dark:text-gray-300 border border-transparent font-mono rounded px-1 py-0.5 center mr-3":
2222
true,
2323
"bg-blue-100 dark:bg-transparent dark:border-blue-600":
2424
method === "GET",
@@ -34,10 +34,10 @@ const EndpointText = ({ method, path }) => (
3434
>
3535
{method}
3636
</span>
37-
<span className="font-mono mr-4 text-xs text-gray-700 dark:text-gray-200">
37+
<span className="font-mono mr-4 text-xs text-gray-700 dark:text-gray-200 break-all">
3838
{path}
3939
</span>
40-
</>
40+
</div>
4141
);
4242

4343
const Endpoint = ({ method, path, name, withLink = false }) => (

0 commit comments

Comments
 (0)