import { arr, str, type TechStackGroup, type TechStackItem } from "./types" /** * Technology matrix: named groups of technologies, each with an optional * emoji/icon and link. */ export function TechStack({ groups }: { groups?: TechStackGroup[] }) { const visible = (arr(groups) ?? []) .map((group) => ({ group, items: arr(group?.items) ?? [] })) .filter(({ items }) => items.length > 0) if (visible.length === 0) return null return (
{visible.map(({ group, items }, groupIndex) => (

{str(group.name) ?? ""}

    {items.map((item, itemIndex) => { const name = str(item?.name) if (!name) return null const url = str(item?.url) const icon = str(item?.icon) const body = ( {icon && } {name} ) return (
  • {url ? ( {body} ) : ( {body} )}
  • ) })}
))}
) }