File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed
src/shared/components/Settings/ExperienceAndSkills/WorkSkills/Skills/AddSkillsModal Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -26,23 +26,18 @@ export default function AddSkillsModal({
26
26
onSave,
27
27
setEditingSkills,
28
28
} ) {
29
- let category ;
30
29
const [ tempStr , setTempStr ] = React . useState ( '' ) ;
31
30
const [ tab , setTab ] = React . useState ( intialCategory ) ;
32
31
const [ displayingSkills , setDisplayingSkills ] = React . useState ( [ ] ) ;
33
- if ( process . env . NODE_ENV === 'production' ) {
34
- category = tab . toUpperCase ( ) ;
35
- } else {
36
- category = tab ;
37
- }
32
+ const category = tab ;
38
33
39
34
// onInit
40
35
React . useEffect ( ( ) => {
41
36
setEditingSkills ( [ ...userSkills ] ) ;
42
37
setDisplayingSkills ( [ ...userSkills ] ) ;
43
38
} , [ userSkills ] ) ;
44
39
45
- const find = ( arr , i ) => arr && arr . indexOf ( i ) !== - 1 ;
40
+ const find = ( arr , i ) => arr && _ . findIndex ( arr , e => e . toLowerCase ( ) === i . toLowerCase ( ) ) !== - 1 ;
46
41
const findSkill = ( arr , skill ) => arr && arr . find ( a => a . id === skill . id ) ;
47
42
48
43
const popularSkills = React . useMemo ( ( ) => allSkills
You can’t perform that action at this time.
0 commit comments