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 { work } from "../(data)/work"; import Link from "@/components/lib/layout/Link"; import React from "react"; import Row from "@/components/lib/layout/Row"; import Divider from "@/components/lib/layout/Divider"; import { twMerge } from "tailwind-merge"; type Props = { noTitle?: boolean; expand?: boolean; }; export default function MyWorkSection({ noTitle, expand }: Props) { const categories = Object.keys(work) as (keyof typeof work)[]; const [category, setCategory] = React.useState( categories[0] ); if (expand) { return (
{!noTitle && (

My Work

Some work I've done in the past
)} {categories.map((ctgr, i) => { const isActive = category === ctgr; return (

{ctgr}

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

My Work

Some work I've done in the past
)} {categories.map((ctgr, i) => { const isActive = category === ctgr; return ( setCategory(ctgr)} >

{ctgr}

); })}
{work[category].portfolio.map((portfolio, index) => { return ( ); })}
); } export function MyWorkPortfolioCard({ portfolio, }: { portfolio: (typeof work.Devops.portfolio)[number]; }) { return (

{portfolio.title}

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