Revize 0441c314
Přidáno uživatelem Dominik Poch před asi 3 roky(ů)
webapp/components/annotation/SubTagItem.tsx | ||
---|---|---|
10 | 10 |
* @returns The item that represents the tag. |
11 | 11 |
*/ |
12 | 12 |
export function SubTagItem(props: { tag: TagInfo; subTag: SubTagInfo }) { |
13 |
/** |
|
14 |
* Tag context. |
|
15 |
*/ |
|
13 | 16 |
const { selectTag } = useContext(TagCategoryContext); |
14 | 17 |
|
15 | 18 |
/** |
webapp/components/annotation/TagItem.tsx | ||
---|---|---|
17 | 17 |
*/ |
18 | 18 |
const [visibleSubTags, setVisibleSubTags] = useState(false); |
19 | 19 |
|
20 |
/** |
|
21 |
* Tag context. |
|
22 |
*/ |
|
20 | 23 |
const { selectTag } = useContext(TagCategoryContext); |
21 | 24 |
|
22 | 25 |
/** |
webapp/contexts/TagCategoryContext.tsx | ||
---|---|---|
82 | 82 |
* Tags managed by the context. |
83 | 83 |
*/ |
84 | 84 |
const [tagCategories, setTagCategories] = useState<TagCategoryInfo[] | null>(null); |
85 |
|
|
86 |
/** |
|
87 |
* Selected tag. |
|
88 |
*/ |
|
85 | 89 |
const [selectedTag, setSelectedTag] = useState<TagInfo | null>(null); |
90 |
|
|
91 |
/** |
|
92 |
* Selected sub tag. |
|
93 |
*/ |
|
86 | 94 |
const [selectedSubTag, setSelectedSubTag] = useState<SubTagInfo | null>(null); |
87 | 95 |
|
88 | 96 |
/** |
Také k dispozici: Unified diff
Added comments