2024-11-19 15:08:39 +08:00
|
|
|
import {
|
|
|
|
categoryKeys,
|
|
|
|
tagKeys,
|
|
|
|
} from './constants'
|
|
|
|
|
|
|
|
export const getValidTagKeys = (tags: string[]) => {
|
|
|
|
return tags.filter(tag => tagKeys.includes(tag))
|
|
|
|
}
|
|
|
|
|
|
|
|
export const getValidCategoryKeys = (category?: string) => {
|
2024-11-25 12:03:49 +08:00
|
|
|
return categoryKeys.find(key => key === category)
|
2024-11-19 15:08:39 +08:00
|
|
|
}
|