mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-18 06:44:46 -07:00
Add getCategoryKindName helper
This commit is contained in:
parent
8fcddd72ac
commit
7f9d335f19
1 changed files with 12 additions and 0 deletions
|
|
@ -201,6 +201,18 @@ export const categories = {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Respective directory for each category
|
||||||
|
export function getCategoryKindName ( categorySlug ) {
|
||||||
|
if ( categorySlug === 'homebrew' ) {
|
||||||
|
return 'formula'
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( categorySlug === 'games' ) {
|
||||||
|
return 'game'
|
||||||
|
}
|
||||||
|
|
||||||
|
return categories[ categorySlug ].slug
|
||||||
|
}
|
||||||
|
|
||||||
export const categoriesById = Object.fromEntries( Object.entries( categories ).map( ([ key, category ]) => [category.id, { ...category, key } ] ) )
|
export const categoriesById = Object.fromEntries( Object.entries( categories ).map( ([ key, category ]) => [category.id, { ...category, key } ] ) )
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue