Skip to content

Commit 7fa27b6

Browse files
committed
fix: dev & prod loading skills
1 parent 3e2d1c0 commit 7fa27b6

File tree

1 file changed

+2
-7
lines changed
  • src/shared/components/Settings/ExperienceAndSkills/WorkSkills/Skills/AddSkillsModal

1 file changed

+2
-7
lines changed

src/shared/components/Settings/ExperienceAndSkills/WorkSkills/Skills/AddSkillsModal/index.jsx

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,23 +26,18 @@ export default function AddSkillsModal({
2626
onSave,
2727
setEditingSkills,
2828
}) {
29-
let category;
3029
const [tempStr, setTempStr] = React.useState('');
3130
const [tab, setTab] = React.useState(intialCategory);
3231
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;
3833

3934
// onInit
4035
React.useEffect(() => {
4136
setEditingSkills([...userSkills]);
4237
setDisplayingSkills([...userSkills]);
4338
}, [userSkills]);
4439

45-
const find = (arr, i) => arr && arr.indexOf(i) !== -1;
40+
const find = (arr, i) => arr && _.findIndex(arr, e => e.toLowerCase() === i.toLowerCase()) !== -1;
4641
const findSkill = (arr, skill) => arr && arr.find(a => a.id === skill.id);
4742

4843
const popularSkills = React.useMemo(() => allSkills

0 commit comments

Comments
 (0)