Improve small details

This commit is contained in:
2023-08-20 23:32:09 +02:00
parent 4432d36abf
commit 02ddb76d39
3 changed files with 15 additions and 3 deletions

View File

@@ -7,8 +7,13 @@ export async function useTalents() {
data: getCategories,
} = await $trpc.talents.getCategories.useQuery()
function getCategoryById(id: number) {
return getCategories.value?.find(category => category.id === id)?.name || 'Not Found'
}
return {
getTalents,
getCategories,
getCategoryById,
}
}