diff --git a/composables/useModrinthFetch.ts b/composables/useModrinthFetch.ts new file mode 100644 index 0000000..4779ace --- /dev/null +++ b/composables/useModrinthFetch.ts @@ -0,0 +1,11 @@ +import type {UseFetchOptions} from "#app"; + +export function useModrinthFetch( + url: string | (() => string), + options: UseFetchOptions = {} +) { + return useFetch(url, { + ...options, + $fetch: $modrinthFetch, + }) +} \ No newline at end of file diff --git a/layouts/default.vue b/layouts/default.vue index 61351ef..9b2314a 100644 --- a/layouts/default.vue +++ b/layouts/default.vue @@ -1,5 +1,7 @@