Skip to content

Commit 39ded8d

Browse files
committed
MP-276 Challenge winner banner update
1 parent 8250d89 commit 39ded8d

File tree

8 files changed

+329
-78
lines changed

8 files changed

+329
-78
lines changed

src/apps/profiles/src/lib/helpers.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,18 @@ export function subTrackLabelToHumanName(label: string): string {
3232
return 'First2Finish'
3333
case 'CONCEPTUALIZATION':
3434
return 'Conceptualization'
35+
case 'SPECIFICATION':
36+
return 'Specification'
37+
case 'BUG_HUNT':
38+
return 'Bug Hunt'
39+
case 'TEST_SUITES':
40+
return 'Test Suites'
41+
case 'TEST_SCENARIOS':
42+
return 'Test Scenarios'
43+
case 'CONTENT_CREATION':
44+
return 'Content Creation'
45+
case 'COPILOT_POSTING':
46+
return 'Copilot Posting'
3547
default: return label
3648
}
3749

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
@import "@libs/ui/styles/includes";
2+
3+
.winWrapper {
4+
display: flex;
5+
flex-direction: column;
6+
align-items: center;
7+
padding: 0 $sp-2;
8+
cursor: pointer;
9+
min-width: 115px;
10+
11+
.winCnt {
12+
font-family: $font-barlow-condensed;
13+
font-size: 32px;
14+
font-weight: 500;
15+
line-height: 34px;
16+
margin-top: $sp-8;
17+
}
18+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import { FC } from 'react'
2+
3+
import styles from './ChallengeWin.module.scss'
4+
5+
interface ChallengeWinProps {
6+
typeName: string
7+
onClick: () => void
8+
winCnt: number
9+
}
10+
11+
const ChallengeWin: FC<ChallengeWinProps> = (props: ChallengeWinProps) => (
12+
<div className={styles.winWrapper} onClick={props.onClick}>
13+
<p className={styles.winCnt}>
14+
{props.winCnt}
15+
{' '}
16+
</p>
17+
<p className='body-ultra-small-bold'>WINS</p>
18+
<p className='body-small-bold'>{props.typeName}</p>
19+
</div>
20+
)
21+
22+
export default ChallengeWin
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { default as ChallengeWin } from './ChallengeWin'

src/apps/profiles/src/member-profile/tc-achievements/ChallengeWinsBanner/ChallengeWinsBanner.module.scss

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
margin-bottom: $sp-8;
2424
background-image: linear-gradient(90deg, #7B21A7, #1974AD);
2525
color: $tc-white;
26-
padding: $sp-8;
26+
padding: $sp-4;
2727

2828
@include ltelg {
2929
padding: $sp-4;
@@ -36,21 +36,8 @@
3636
.wins {
3737
display: flex;
3838
flex-wrap: wrap;
39-
justify-content: space-evenly;
39+
justify-content: center;
4040
width: 100%;
41-
42-
.winWrapper {
43-
display: flex;
44-
flex-direction: column;
45-
align-items: center;
46-
47-
.winCnt {
48-
font-size: 44px;
49-
font-weight: 500;
50-
line-height: 34px;
51-
margin-top: $sp-8;
52-
}
53-
}
5441
}
5542
}
5643
}

0 commit comments

Comments
 (0)