import Card from "@/components/lib/elements/Card"; import H2 from "@/components/lib/layout/H2"; import H3 from "@/components/lib/layout/H3"; import Section from "@/components/lib/layout/Section"; import Span from "@/components/lib/layout/Span"; import Stack from "@/components/lib/layout/Stack"; import { skills } from "../(data)/skills"; import React from "react"; import Row from "@/components/lib/layout/Row"; import { twMerge } from "tailwind-merge"; import Divider from "@/components/lib/layout/Divider"; 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)[]; if (expand) { return (
{!noTitle && (

My Skills

A summary of the vast array of tools I've mastered over the years
)} {categories.map((ctgr, i) => { return (

{ctgr}

{skills[ctgr].description}
{skills[ctgr].portfolio.map( (portfolio, index) => { return ( ); } )}
); })}
); } return (
{!noTitle && (

My Skills

A summary of the vast array of tools I've mastered over the years
)} {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 && ( )} ))} )}
); }