We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 990f785 commit fcaaf83Copy full SHA for fcaaf83
1 file changed
hwproj.front/src/components/Common/HomeworkTags.tsx
@@ -11,11 +11,16 @@ export const isBonusWork = (tagsOwner: { tags?: string[] }) => tagsOwner.tags?.i
11
12
export const TestTip: FC = () => <sup style={{color: "#2979ff"}}> тест</sup>
13
const BonusTip: FC = () => <sup style={{color: "green"}}> бонус</sup>
14
+const TestBonusTip: FC = () => <sup style={{color: "#2979ff"}}> бонус</sup>
15
16
export const getTip = (tagsOwner: { tags?: string[] }) => {
17
const tags = tagsOwner.tags
18
if (tags == null) return null
19
+
20
+ if (tags.includes(BonusTag)) {
21
+ if (tags.includes(TestTag)) return <TestBonusTip/>
22
+ return <BonusTip/>
23
+ }
24
if (tags.includes(TestTag)) return <TestTip/>
- if (tags.includes(BonusTag)) return <BonusTip/>
25
return null
26
}
0 commit comments