mirror of
https://github.com/ArthurDanjou/website.git
synced 2026-01-24 00:40:30 +01:00
Simplify code
This commit is contained in:
@@ -23,14 +23,9 @@ 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 {
|
||||
talents,
|
||||
getCategories,
|
||||
getCategoryById,
|
||||
isFavorite,
|
||||
switchCategory,
|
||||
toggleFavorite,
|
||||
|
||||
Reference in New Issue
Block a user