-
Notifications
You must be signed in to change notification settings - Fork 9
/
Skills.tsx
37 lines (34 loc) · 1.56 KB
/
Skills.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import type { NextPage } from "next";
import { ISkills, SKILLSET } from "../typings";
import { Skill } from "./Skill";
interface ISKillsProps {
skills: ISkills[];
}
export const Skills: NextPage<ISKillsProps> = ({ skills }) => {
const languages = skills?.filter(skill => skill?.fieldType?.toLowerCase() === SKILLSET.LANGUAGES);
const frontend = skills?.filter(skill => skill?.fieldType?.toLowerCase() === SKILLSET.FRONTEND);
const uilibraries = skills?.filter(skill => skill?.fieldType?.toLowerCase() === SKILLSET.UI_LIBRARIES);
const backend = skills?.filter(
skill =>
skill?.fieldType?.toLowerCase() === SKILLSET.BACKEND || skill?.fieldType?.toLowerCase() === SKILLSET.DATABASE
);
const headlessCms = skills?.filter(skill => skill?.fieldType?.toLowerCase() === SKILLSET.HEADLESS_CMS);
const testing_tools = skills?.filter(
skill => skill?.fieldType?.toLowerCase() === SKILLSET.TESTING || skill?.fieldType?.toLowerCase() === SKILLSET.TOOLS
);
const familiar = skills?.filter(skill => skill?.proficient === false);
return (
<>
<h1 className="skills_heading">Skills</h1>
<div className="skills_box">
<Skill skills={languages} skill="Languages" />
<Skill skills={frontend} skill="Frontend" />
<Skill skills={uilibraries} skill="UI Libraries" />
<Skill skills={backend} skill="Backend & Database" />
<Skill skills={headlessCms} skill="Headless CMS" />
<Skill skills={testing_tools} skill="Testing & Other Tools" />
<Skill skills={familiar} skill="Familiar" />
</div>
</>
);
};