mirror of
https://github.com/modrinth/code.git
synced 2026-08-26 17:44:50 +00:00
* refactor: breadcrumbs system * fix: qa * fix: qa * fix: qa * fix: qa * fix: loading flashes * fix: qa * fix: prepr * fix: qa * fix: change icon * use modrinth logo in header for compactness --------- Co-authored-by: Prospector <6166773+Prospector@users.noreply.github.com>
38 lines
1.0 KiB
Vue
38 lines
1.0 KiB
Vue
<script setup lang="ts">
|
|
import type { Labrinth } from '@modrinth/api-client'
|
|
import { ServerStackIcon } from '@modrinth/assets'
|
|
import { injectModrinthClient, ServersManagePageIndex } from '@modrinth/ui'
|
|
import { useQuery } from '@tanstack/vue-query'
|
|
import { computed } from 'vue'
|
|
|
|
import { useRootBreadcrumb } from '@/providers/breadcrumbs'
|
|
|
|
import { config } from '../config'
|
|
|
|
const stripePublishableKey = (config.stripePublishableKey as string) || ''
|
|
|
|
const client = injectModrinthClient()
|
|
|
|
useRootBreadcrumb({
|
|
slot: 'root',
|
|
id: 'servers',
|
|
label: 'Servers',
|
|
to: '/hosting/manage/',
|
|
visual: { type: 'icon', component: ServerStackIcon },
|
|
})
|
|
|
|
const { data: products } = useQuery({
|
|
queryKey: ['billing', 'products'],
|
|
queryFn: () => client.labrinth.billing_internal.getProducts(),
|
|
})
|
|
|
|
const resolvedProducts = computed<Labrinth.Billing.Internal.Product[]>(() => products.value ?? [])
|
|
</script>
|
|
|
|
<template>
|
|
<ServersManagePageIndex
|
|
:stripe-publishable-key="stripePublishableKey"
|
|
:products="resolvedProducts"
|
|
/>
|
|
</template>
|