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

@@ -21,14 +21,20 @@ watch(
}
)
const { data: championData }: ChampionResponse = await useFetch(
const { data: championData } = useFetch<{ name: string; title: string }>(
CDRAGON_BASE +
'plugins/rcp-be-lol-game-data/global/default/v1/champions/' +
props.championId +
'.json'
'.json',
{
lazy: true, // Don't block rendering
server: false // Client-side only
}
)
const championName = championData.value.name
const championDescription = championData.value.title
// Handle loading and error states
const championName = computed(() => championData.value?.name || 'Loading...')
const championDescription = computed(() => championData.value?.title || '')
</script>
<template>