feat: 分类数据统一
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { CATEGORY_LIST_WITH_ALL } from '../../core/data/categories';
|
||||
import { AGE_BANDS } from '../../core/data/difficulty';
|
||||
|
||||
export type HomeDisplayItem = {
|
||||
@@ -43,15 +44,9 @@ export type HomeDisplayDataset = {
|
||||
sections: HomeDisplaySection[];
|
||||
};
|
||||
|
||||
const HOME_CATEGORY_TABS = [
|
||||
{ id: 'all', name: '全部' },
|
||||
{ id: 'math', name: '数感启蒙' },
|
||||
{ id: 'pinyin', name: '汉语拼音' },
|
||||
{ id: 'puzzle', name: '益智游戏' },
|
||||
{ id: 'chinese', name: '趣味识字' },
|
||||
{ id: 'english', name: '英语启蒙' },
|
||||
{ id: 'craft', name: '创意手工' },
|
||||
] as const;
|
||||
const HOME_CATEGORY_TABS: HomeDisplayDataset['categoryTabs'] = CATEGORY_LIST_WITH_ALL.map(
|
||||
({ id, name }) => ({ id, name }),
|
||||
);
|
||||
|
||||
const HOME_AGE_BANDS = AGE_BANDS.map((item, index) => ({
|
||||
key: item.key,
|
||||
|
||||
Reference in New Issue
Block a user