Skip to content

Commit 49a760c

Browse files
committed
Lint fixes and smaller background image
1 parent 3e5f850 commit 49a760c

File tree

4 files changed

+36
-37
lines changed

4 files changed

+36
-37
lines changed

src/apps/profiles/src/member-profile/profile-header/ProfileHeader.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import {
1111
UserTraitIds,
1212
UserTraits,
1313
} from '~/libs/core'
14-
import { Button } from '~/libs/ui'
1514

1615
import { EditMemberPropertyBtn } from '../../components'
1716
import { EDIT_MODE_QUERY_PARAM, profileEditModes } from '../../config'
-967 KB
Loading

src/apps/talent-search/src/routes/talent-search/TalentSearch.tsx

Lines changed: 33 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable react/prop-types */
12
/* eslint-disable react/destructuring-assignment */
23
/* eslint-disable @typescript-eslint/no-unused-vars */
34
/* eslint-disable arrow-body-style */
@@ -9,10 +10,11 @@
910
import {
1011
FC,
1112
useState,
12-
CSSProperties
13+
CSSProperties,
1314
} from 'react'
1415

15-
import { components, ControlProps, Options, GroupBase, MultiValue, SingleValue, StylesConfig, ActionMeta } from 'react-select'
16+
import { components, ControlProps, Options,
17+
GroupBase, MultiValue, SingleValue, StylesConfig, ActionMeta } from 'react-select'
1618
import AsyncSelect from 'react-select/async'
1719

1820
import { ContentLayout } from '~/libs/ui'
@@ -23,24 +25,25 @@ import SkillPill from './components/SkillPill'
2325
import styles from './TalentSearch.module.scss'
2426

2527
function search(skills:Options<Skill>): void {
26-
alert("Searching skills: " + JSON.stringify(skills))
28+
alert(JSON.stringify(skills))
2729
}
2830

29-
const Control: React.FC<ControlProps<Skill, boolean, GroupBase<Skill>>> = ({children, ...props }) => (
31+
const Control: React.FC<ControlProps<Skill, boolean, GroupBase<Skill>>> = ({ children, ...props }) => (
3032
<components.Control {...props}>
3133
{children}
32-
<span onClick={() => search(props.getValue())} className={styles.searchIconSpan}><SearchIcon className={styles.searchIcon} /></span>
34+
<span
35+
onClick={() => search(props.getValue())}
36+
className={styles.searchIconSpan}
37+
>
38+
<SearchIcon className={styles.searchIcon} />
39+
</span>
3340
</components.Control>
3441
)
3542

3643
export const TalentSearch: FC = () => {
3744
const [skillsFilter, setSkillsFilter] = useState<Array<Skill>>([])
3845

39-
function search(): void {
40-
alert("Searching for skills: " + JSON.stringify(skillsFilter))
41-
}
42-
43-
function toggleSkill(skill:Skill, pill:SkillPill): void {
46+
function toggleSkill(skill:Skill): void {
4447
let newFilter: Array<Skill> = []
4548
let deleted: boolean = false
4649
if (skillsFilter) {
@@ -49,8 +52,7 @@ export const TalentSearch: FC = () => {
4952
skillsFilter.forEach((filterSkill, index) => {
5053
if (filterSkill.emsiId === skill.emsiId) {
5154
deleted = true
52-
}
53-
else {
55+
} else {
5456
newFilter.push(filterSkill)
5557
}
5658
})
@@ -65,8 +67,7 @@ export const TalentSearch: FC = () => {
6567
function onChange(options:MultiValue<Skill> | SingleValue<Skill>, meta:ActionMeta<Skill>): void {
6668
if (Array.isArray(options)) {
6769
setSkillsFilter(options)
68-
}
69-
else {
70+
} else {
7071
setSkillsFilter([])
7172
}
7273
}
@@ -91,10 +92,10 @@ export const TalentSearch: FC = () => {
9192
[{ name: 'HyperText Markup Language (HTML)', emsiId: 'KS1200578T5QCYT0Z98G' },
9293
{ name: 'IOS Development', emsiId: 'ES86A20379CD2AD061F3' },
9394
{ name: 'Node.js', emsiId: 'KS127296VDYS7ZFWVC46' }],
94-
[{ name: '.NET Development', emsiId: 'ES50D03AC9CFC1A0BC93' },
95+
[{ name: '.NET Development', emsiId: 'ES50D03AC9CFC1A0BC93' },
9596
{ name: 'C++ (Programming Language)', emsiId: 'KS1219W70LY1GXZDSKW5' },
9697
{ name: 'PHP Development', emsiId: 'KS127SZ60YZR8B5CQKV1' }],
97-
[{ name: 'Adobe Illustrator', emsiId: 'KS1206V6K46N1SDVJGBD' },
98+
[{ name: 'Adobe Illustrator', emsiId: 'KS1206V6K46N1SDVJGBD' },
9899
{ name: 'Ruby (Programming Language)', emsiId: 'ESD07FEE22E7EC094EB8' },
99100
{ name: 'Java (Programming Language)', emsiId: 'KS120076FGP5WGWYMP0F' }],
100101
[{ name: 'React Native', emsiId: 'KSPSGF5MXB6568UIQ4BK' },
@@ -116,7 +117,6 @@ export const TalentSearch: FC = () => {
116117
fontWeight: 400,
117118
}
118119

119-
120120
const multiValueStyle: CSSProperties = {
121121
backgroundColor: 'white',
122122
border: '1px solid #d4d4d4',
@@ -225,21 +225,27 @@ export const TalentSearch: FC = () => {
225225
components={{ Control }}
226226
openMenuOnClick={false}
227227
value={skillsFilter}
228-
onChange={(newValue: MultiValue<Skill> | SingleValue<Skill>, actionMeta: ActionMeta<Skill>) =>
229-
onChange(newValue, actionMeta)}
228+
onChange={(
229+
newValue: MultiValue<Skill> | SingleValue<Skill>,
230+
actionMeta: ActionMeta<Skill>,
231+
) => onChange(newValue, actionMeta)}
230232
/>
231233
</div>
232234
<div className={styles.popularSkillsContainer}>
233235
<span className={styles.popularSkillsTitle}>Popular Skills</span>
234236

235-
{popularSkills.map(row =>
236-
<div className={styles.pillRow}>
237-
{row.map(skill =>
238-
<SkillPill skill={skill}
239-
selected={ filteringSkill(skill) }
240-
onClick={toggleSkill}
241-
/> )}
242-
</div>
237+
{popularSkills.map(
238+
row => (
239+
<div className={styles.pillRow}>
240+
{row.map(skill => (
241+
<SkillPill
242+
skill={skill}
243+
selected={filteringSkill(skill)}
244+
onClick={toggleSkill}
245+
/>
246+
))}
247+
</div>
248+
),
243249
)}
244250
</div>
245251
</ContentLayout>

src/apps/talent-search/src/routes/talent-search/components/SkillPill.tsx

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable react/prefer-stateless-function */
12
/* eslint-disable react/jsx-no-bind */
23
/* eslint-disable react/no-access-state-in-setstate */
34
/* eslint-disable react/state-in-constructor */
@@ -10,22 +11,15 @@ import styles from './SkillPill.module.scss'
1011
type SkillPillProps = {
1112
skill: Skill,
1213
selected: boolean
13-
onClick: (skill:Skill, pill:SkillPill) => void,
14+
onClick: (skill:Skill) => void,
1415
}
1516

1617
export default class SkillPill extends Component<SkillPillProps> {
17-
constructor(props: SkillPillProps) {
18-
super(props)
19-
}
20-
21-
componentDidUpdate(): void {
22-
}
23-
2418
render(): JSX.Element | null {
2519
return (
2620
<span
2721
className={this.props.selected ? styles.selected : styles.unSelected}
28-
onClick={() => this.props.onClick(this.props.skill, this)}
22+
onClick={() => this.props.onClick(this.props.skill)}
2923
>
3024
<span className={styles.pillText}>
3125
{this.props.skill.name}

0 commit comments

Comments
 (0)