mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-18 06:44:46 -07:00
Add getKindToCategory helper
This commit is contained in:
parent
29668409f8
commit
43dfe4eccf
1 changed files with 2 additions and 1 deletions
|
|
@ -213,7 +213,8 @@ export function getCategoryKindName ( categorySlug ) {
|
||||||
return categoryToKind[ categorySlug ]
|
return categoryToKind[ categorySlug ]
|
||||||
}
|
}
|
||||||
|
|
||||||
return categories[ categorySlug ].slug
|
export function getKindToCategory ( kindSlug ) {
|
||||||
|
return Object.keys( categories ).find( key => categoryToKind[ key ] === kind )
|
||||||
}
|
}
|
||||||
|
|
||||||
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