import Card from "@/src/components/lib/elements/Card"; import H2 from "@/src/components/lib/layout/H2"; import H3 from "@/src/components/lib/layout/H3"; import Section from "@/src/components/lib/layout/Section"; import Span from "@/src/components/lib/layout/Span"; import Stack from "@/src/components/lib/layout/Stack"; import { skills } from "../(data)/skills"; import React from "react"; import Row from "@/src/components/lib/layout/Row"; import { twMerge } from "tailwind-merge"; import Divider from "@/src/components/lib/layout/Divider"; import ArrowedLink from "@/src/components/lib/layout/ArrowedLink"; type Props = { noTitle?: boolean; expand?: boolean; }; export default function MySkillsSection({ noTitle, expand }: Props) { const [category, setCategory] = React.useState("Devops"); const categories = Object.keys(skills) as (keyof typeof skills)[]; const TitleSection = ( {noTitle ? null : (

My Skills

A summary of the tools I've mastered over the years
)}
{noTitle ? null : ( )}
); if (expand) { return (
{TitleSection} {categories.map((ctgr, i) => { return (

{ctgr}

{skills[ctgr].description}
{skills[ctgr].portfolio.map( (portfolio, index) => { return ( ); }, )}
); })}
); } return (
{TitleSection} {categories.map((ctgr, i) => { const isActive = category === ctgr; return ( setCategory(ctgr)} >

{ctgr}

{skills[ctgr].description}
); })}
{skills[category].portfolio.map((portfolio, index) => { return ( ); })}
); } export function MySkillsCard({ portfolio, }: { portfolio: (typeof skills.Devops.portfolio)[number]; }) { return (

{portfolio.title}

{portfolio.description} {portfolio.technologies?.[0] && ( {portfolio.technologies.map((tch, _i) => ( {tch} {_i < portfolio.technologies.length - 1 && ( )} ))} )}
); }