Removed awaits, clean up API route
All checks were successful
pipeline / lint-and-format (push) Successful in 4m54s
pipeline / build-and-push-images (push) Successful in 4m43s

This commit is contained in:
2026-01-23 21:22:19 +01:00
parent ef48e748db
commit 653b0c41d7
4 changed files with 77 additions and 17 deletions

View File

@@ -19,8 +19,10 @@ function handleStateChange(newState: string, newLane: number) {
emit('stateChange', newState, newLane)
}
const { data: stats }: { data: Ref<{ patch: number; count: number }> } =
await useFetch('/api/stats')
const { data: stats }: { data: Ref<{ patch: number; count: number }> } = useFetch('/api/stats', {
lazy: true, // Don't block rendering
server: false // Client-side only
})
const route = useRoute()
@@ -127,8 +129,13 @@ if (route.path.startsWith('/tierlist/')) {
</div>
<div style="position: absolute; bottom: 0; margin-bottom: 10px; padding-left: 10px">
<h3 style="font-size: 23px; font-weight: 200">Patch {{ stats.patch }}</h3>
<h3 style="font-size: 23px; font-weight: 200">{{ stats.count }} games</h3>
<template v-if="stats">
<h3 style="font-size: 23px; font-weight: 200">Patch {{ stats.patch }}</h3>
<h3 style="font-size: 23px; font-weight: 200">{{ stats.count }} games</h3>
</template>
<template v-else>
<h3 style="font-size: 23px; font-weight: 200; opacity: 0.5">Loading stats...</h3>
</template>
<NuxtLink to="/about"><h3>About</h3></NuxtLink>
<h2 style="font-size: 12px; font-weight: 200; margin-top: 5px">
BuildPath isn't endorsed by Riot Games and doesn't reflect the views or opinions of Riot