fix: marketplace collection condition

This commit is contained in:
StyleZhang
2024-11-25 12:03:49 +08:00
parent 3263a6a5f5
commit 4f54ac6ed6
5 changed files with 29 additions and 4 deletions

View File

@ -8,6 +8,5 @@ export const getValidTagKeys = (tags: string[]) => {
}
export const getValidCategoryKeys = (category?: string) => {
const currentCategory = categoryKeys.find(key => key === category)
return currentCategory ? `${currentCategory}s` : ''
return categoryKeys.find(key => key === category)
}