Modrinth/pages/dashboard/analytics.vue
Carter 2fb63dcfb1
Fix graph state & data handling (#1578)
* Rip out external color state

* Fix styling errors

* Allow charts to display personal/entity perspectives on routes

* Refactor analytics data processing and selection

* Include custom color icon
2024-01-12 17:51:03 -05:00

25 lines
473 B
Vue

<template>
<div>
<ChartDisplay :projects="projects ?? undefined" :personal="true" />
</div>
</template>
<script setup>
import ChartDisplay from '~/components/ui/charts/ChartDisplay.vue'
definePageMeta({
middleware: 'auth',
})
useHead({
title: 'Analytics - Modrinth',
})
const auth = await useAuth()
const id = auth.value?.user?.id
const { data: projects } = await useAsyncData(`user/${id}/projects`, () =>
useBaseFetch(`user/${id}/projects`)
)
</script>