Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
import type { UseFetchOptions } from 'nuxt/app'

export function useCustomFetch<T>(
url: string | (() => string),
options: UseFetchOptions<T> = {},
) {
return useFetch(url, {
...options,
$fetch: useNuxtApp().$customFetch,
})
}
export const useCustomFetch = createUseFetch(callerOptions => ({
$fetch: useNuxtApp().$customFetch as typeof $fetch,
...callerOptions,
}))

Check failure on line 4 in examples/advanced/use-custom-fetch-composable/composables/useCustomFetch.ts

View workflow job for this annotation

GitHub Actions / lint

Newline required at end of file but not found
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
},
"resolutions": {
"@nuxt/examples-ui": "workspace:*",
"@nuxt/kit": "4.1.3",
"nuxt": "4.1.0",
"@nuxt/kit": "4.4.2",
"nuxt": "4.4.2",
"vue": "3.5.32",
"@vue/shared": "3.5.32"
},
Expand Down
Loading
Loading