Skip to content

Commit c22a681

Browse files
committed
Merge branch 'dev' into onboarding
2 parents 88b883a + 187787a commit c22a681

File tree

177 files changed

+3804
-2373
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

177 files changed

+3804
-2373
lines changed

.vscode/components.code-snippets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"const ${1:ComponentName}: FC<${1:ComponentName}Props> = props => {",
3030
"",
3131
" return (",
32-
" <div className={styles['wrap']}>",
32+
" <div className={styles.wrap}>",
3333
" </div>",
3434
" )",
3535
"}",

.vscode/settings.json

Lines changed: 0 additions & 3 deletions
This file was deleted.

craco.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ module.exports = {
4242
'@devCenter': resolve('src/apps/dev-center/src'),
4343
'@gamificationAdmin': resolve('src/apps/gamification-admin/src'),
4444
'@talentSearch': resolve('src/apps/talent-search/src'),
45+
'@profiles': resolve('src/apps/profiles/src'),
4546

4647
'@platform': resolve('src/apps/platform/src'),
4748
// aliases used in SCSS files

src/apps/profiles/src/ProfilesApp.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,20 @@ import { FC, useContext } from 'react'
22
import { Outlet, Routes } from 'react-router-dom'
33

44
import { routerContext, RouterContextData } from '~/libs/core'
5+
import { SharedSwrConfig } from '~/libs/shared'
56

67
import { toolTitle } from './profiles.routes'
7-
import { ProfileSwr } from './lib'
88

99
const ProfilesApp: FC<{}> = () => {
1010
const { getChildRoutes }: RouterContextData = useContext(routerContext)
1111

1212
return (
13-
<ProfileSwr>
13+
<SharedSwrConfig>
1414
<Outlet />
1515
<Routes>
1616
{getChildRoutes(toolTitle)}
1717
</Routes>
18-
</ProfileSwr>
18+
</SharedSwrConfig>
1919
)
2020
}
2121

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
@import "@libs/ui/styles/includes";
2+
3+
.container {
4+
display: flex;
5+
flex-direction: column;
6+
7+
.content {
8+
.contentHeader {
9+
display: flex;
10+
justify-content: space-between;
11+
align-items: center;
12+
border-bottom: 1px solid $black-10;
13+
margin: $sp-4 0;
14+
padding-bottom: $sp-2;
15+
16+
.contentHeaderActions {
17+
button {
18+
margin-right: $sp-2;
19+
20+
&:last-child {
21+
margin-right: 0;
22+
}
23+
}
24+
}
25+
}
26+
27+
.contentBody {
28+
height: 385px;
29+
overflow: auto;
30+
31+
@include ltelg {
32+
height: auto;
33+
}
34+
}
35+
}
36+
}
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
/* eslint-disable complexity */
2+
import { Dispatch, FC, SetStateAction, useState } from 'react'
3+
4+
import { BaseModal } from '~/libs/ui'
5+
import {
6+
MemberStats,
7+
} from '~/libs/core'
8+
9+
import { numberToFixed } from '../../lib'
10+
11+
import styles from './BannersIconsDetailsModal.module.scss'
12+
13+
type WebDesignViewTypes = 'CHALLENGES DETAILS'
14+
15+
interface BannersIconsDetailsModalProps {
16+
onClose: () => void
17+
bannersIconsStats: MemberStats | undefined
18+
}
19+
20+
const BannersIconsDetailsModal: FC<BannersIconsDetailsModalProps> = (props: BannersIconsDetailsModalProps) => {
21+
const [viewType]: [WebDesignViewTypes, Dispatch<SetStateAction<WebDesignViewTypes>>]
22+
= useState<WebDesignViewTypes>('CHALLENGES DETAILS')
23+
24+
return (
25+
<BaseModal
26+
onClose={props.onClose}
27+
open
28+
size='body'
29+
title='Banners Or Icons'
30+
>
31+
32+
<div className={styles.container}>
33+
<div className='member-stat-header'>
34+
<div>
35+
<span className='member-stat-value'>{props.bannersIconsStats?.wins}</span>
36+
Wins
37+
</div>
38+
<div>
39+
<span className='member-stat-value'>{props.bannersIconsStats?.challenges}</span>
40+
Challenges
41+
</div>
42+
<div>
43+
<span className='member-stat-value'>
44+
{numberToFixed(props.bannersIconsStats?.rank?.overallPercentile || 0)}
45+
%
46+
</span>
47+
Percentile
48+
</div>
49+
<div>
50+
<span className='member-stat-value'>
51+
{numberToFixed(props.bannersIconsStats?.screeningSuccessRate || 0)}
52+
%
53+
</span>
54+
Screening Success Rate
55+
</div>
56+
<div>
57+
<span className='member-stat-value'>
58+
{numberToFixed(props.bannersIconsStats?.avgPlacement || 0)}
59+
</span>
60+
Average Placement
61+
</div>
62+
</div>
63+
64+
<div className={styles.content}>
65+
<div className={styles.contentHeader}>
66+
<h4>{viewType}</h4>
67+
</div>
68+
69+
<div className={styles.contentBody}>
70+
{
71+
viewType === 'CHALLENGES DETAILS' && (
72+
<div />
73+
)
74+
75+
}
76+
</div>
77+
</div>
78+
</div>
79+
</BaseModal>
80+
)
81+
}
82+
83+
export default BannersIconsDetailsModal
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { default as BannersIconsDetailsModal } from './BannersIconsDetailsModal'

src/apps/profiles/src/components/DesignF2FDetailsModal/DesignF2FDetailsModal.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@ const DesignF2FDetailsModal: FC<DesignF2FDetailsModalProps> = (props: DesignF2FD
5555
Screening Success Rate
5656
</div>
5757
<div>
58-
<span className='member-stat-value'>{props.designF2FStats?.avgPlacement}</span>
58+
<span className='member-stat-value'>
59+
{numberToFixed(props.designF2FStats?.avgPlacement || 0)}
60+
</span>
5961
Average Placement
6062
</div>
6163
</div>

src/apps/profiles/src/components/EmptySection/EmptySection.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ const EmptySection: FC<EmptySectionProps> = props => (
3434
{props.title && (
3535
<div className='body-medium-bold'>{props.title}</div>
3636
)}
37-
{props.children}
37+
<div className='body-main'>
38+
{props.children}
39+
</div>
3840
</>
3941
)}
4042
</div>
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
@import "@libs/ui/styles/includes";
2+
3+
.container {
4+
display: flex;
5+
flex-direction: column;
6+
7+
.content {
8+
.contentHeader {
9+
display: flex;
10+
justify-content: space-between;
11+
align-items: center;
12+
border-bottom: 1px solid $black-10;
13+
margin: $sp-4 0;
14+
padding-bottom: $sp-2;
15+
16+
.contentHeaderActions {
17+
button {
18+
margin-right: $sp-2;
19+
20+
&:last-child {
21+
margin-right: 0;
22+
}
23+
}
24+
}
25+
}
26+
27+
.contentBody {
28+
height: 385px;
29+
overflow: auto;
30+
31+
@include ltelg {
32+
height: auto;
33+
}
34+
}
35+
}
36+
}

0 commit comments

Comments
 (0)