refactor: remove useBaseFetch for @modrinth/api-client (#5596)

* Reapply "fix: start swapping useBaseFetch usages to api-client"

This reverts commit f4f33db701.

* fix: bugs

* fix: analytics

* fix: lint
This commit is contained in:
Calum H.
2026-03-17 20:06:19 +00:00
committed by GitHub
parent 58c1e225c8
commit 87c86c7d0d
64 changed files with 2073 additions and 691 deletions
@@ -5,6 +5,7 @@
</template>
<script setup>
import { injectModrinthClient } from '@modrinth/ui'
import { useQuery } from '@tanstack/vue-query'
import ChartDisplay from '~/components/ui/charts/ChartDisplay.vue'
@@ -18,11 +19,12 @@ useHead({
})
const auth = await useAuth()
const client = injectModrinthClient()
const id = auth.value?.user?.id
const { data: projects } = useQuery({
queryKey: computed(() => ['user', id, 'projects']),
queryFn: () => useBaseFetch(`user/${id}/projects`),
queryFn: () => client.labrinth.users_v2.getProjects(id),
enabled: computed(() => !!id),
})
</script>