mirror of
https://github.com/RealKai42/qwerty-learner.git
synced 2026-04-05 14:29:04 +08:00
fix: dict filename error & fix set dict tag error
This commit is contained in:
@@ -29,9 +29,12 @@ export default function DictionaryGroup({ groupedDictsByTag }: { groupedDictsByT
|
||||
|
||||
useEffect(() => {
|
||||
const commonTags = findCommonValues(tagList, currentDictInfo.tags)
|
||||
setCurrentTag(commonTags[0])
|
||||
if (commonTags.length > 0) {
|
||||
setCurrentTag(commonTags[0])
|
||||
}
|
||||
}, [currentDictInfo.tags, tagList])
|
||||
|
||||
console.log(groupedDictsByTag[currentTag], groupedDictsByTag, currentTag)
|
||||
return (
|
||||
<div>
|
||||
<DictTagSwitcher tagList={tagList} currentTag={currentTag} onChangeCurrentTag={onChangeCurrentTag} />
|
||||
|
||||
@@ -107,7 +107,7 @@ const chinaExam: DictionaryResource[] = [
|
||||
description: 'common suffix',
|
||||
category: '中国考试',
|
||||
tags: ['其他'],
|
||||
url: '/dicts/suffix word.json',
|
||||
url: '/dicts/suffix_word.json',
|
||||
length: 126,
|
||||
language: 'en',
|
||||
languageCategory: 'en',
|
||||
@@ -118,8 +118,8 @@ const chinaExam: DictionaryResource[] = [
|
||||
description: 'common roots',
|
||||
category: '中国考试',
|
||||
tags: ['其他'],
|
||||
url: '/dicts/word roots1.json',
|
||||
length: 368,
|
||||
url: '/dicts/word_roots1.json',
|
||||
length: 369,
|
||||
language: 'en',
|
||||
languageCategory: 'en',
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user