Skip to content

Commit 78b2a40

Browse files
committed
fix: fix baseUrl in fetcherTemplate
1 parent b2751d0 commit 78b2a40

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

plugins/typescript/src/templates/fetcher.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,7 @@ export const getFetcher = ({
1717
`${
1818
contextPath
1919
? `import { ${pascal(prefix)}Context } from "./${contextPath}";`
20-
: `
21-
22-
const baseUrl = ${baseUrl ? `"${baseUrl}"` : `""; // TODO add your baseUrl`}
23-
24-
export type ${pascal(prefix)}FetcherExtraProps = {
20+
: `export type ${pascal(prefix)}FetcherExtraProps = {
2521
/**
2622
* You can add some extra props to your generated fetchers.
2723
*
@@ -33,6 +29,8 @@ export const getFetcher = ({
3329
}`
3430
}
3531
32+
const baseUrl = ${baseUrl ? `"${baseUrl}"` : `""; // TODO add your baseUrl`}
33+
3634
export type ${pascal(
3735
prefix
3836
)}FetcherOptions<TBody, THeaders, TQueryParams, TPathParams> = {

0 commit comments

Comments
 (0)