|
1 | | -import { twMerge } from "tailwind-merge"; |
2 | 1 | import { QuestionsSidebarSection } from "../QuestionsSidebarSection"; |
3 | | -import HTMLLogo from "../../../../public/icons/html5-logo.svg"; |
4 | | -import CSSLogo from "../../../../public/icons/css3-logo.svg"; |
5 | | -import JavaScriptLogo from "../../../../public/icons/javascript-logo.svg"; |
6 | | -import AngularLogo from "../../../../public/icons/angularjs-logo.svg"; |
7 | | -import ReactLogo from "../../../../public/icons/reactjs-logo.svg"; |
8 | | -import GitLogo from "../../../../public/icons/git-logo.svg"; |
9 | | -import OtherLogo from "../../../../public/icons/other-logo.svg"; |
10 | 2 | import AddIcon from "../../../../public/icons/add-icon.svg"; |
11 | | - |
| 3 | +import { technologies } from "../../../lib/technologies"; |
12 | 4 | import { Technology, TechnologyLink } from "./Technology"; |
13 | 5 |
|
14 | | -const technologyFilters = [ |
15 | | - { technology: "html", technologyTitle: "HTML", icon: <HTMLLogo /> }, |
16 | | - { technology: "css", technologyTitle: "CSS", icon: <CSSLogo /> }, |
17 | | - { technology: "js", technologyTitle: "JS", icon: <JavaScriptLogo /> }, |
18 | | - { technology: "angular", technologyTitle: "Angular", icon: <AngularLogo /> }, |
19 | | - { technology: "react", technologyTitle: "React", icon: <ReactLogo /> }, |
20 | | - { technology: "git", technologyTitle: "Git", icon: <GitLogo /> }, |
21 | | - { technology: "other", technologyTitle: "Inne", icon: <OtherLogo /> }, |
22 | | -] as const; |
23 | | - |
24 | 6 | export const TechnologyFilter = () => { |
25 | 7 | return ( |
26 | 8 | <QuestionsSidebarSection title="Wybierz technologię"> |
27 | 9 | <ul className="flex justify-between gap-x-4 overflow-x-auto px-4 pb-4 sm:flex-wrap sm:gap-x-0 sm:gap-y-5 sm:overflow-x-visible sm:p-0 small-filters:gap-y-2"> |
28 | | - {technologyFilters.map((tech) => ( |
29 | | - <li key={tech.technology} className="pt-1"> |
30 | | - <Technology {...tech} /> |
| 10 | + {technologies.map((technology) => ( |
| 11 | + <li key={technology} className="pt-1"> |
| 12 | + <Technology technology={technology} /> |
31 | 13 | </li> |
32 | 14 | ))} |
33 | 15 | <li className="pt-1"> |
|
0 commit comments