Files

69 lines
2.0 KiB
TypeScript
Raw Permalink Normal View History

import { twMerge } from 'tailwind-merge'
2026-05-19 19:57:18 +09:00
import { getPageCopy } from '@repo/content/loaders'
import type { Language, TechStackOverviewSection } from '@repo/content/schemas'
2026-05-19 16:07:24 +09:00
import ContentWidth from '@/components/layout/content-width'
2026-05-21 00:12:32 +09:00
import { Reveal, RevealItem } from '@/components/motion/reveal'
import { ROUTES } from '@/constants/routes'
2026-05-19 19:57:18 +09:00
import { createSectionFinder } from '@/lib/page-sections'
2026-05-19 19:57:18 +09:00
import { TechStackDiagram } from './tech-stack-diagram'
2026-05-19 16:07:24 +09:00
2026-05-19 19:57:18 +09:00
const findTechnologyStackSection = createSectionFinder('technology-stack')
2026-04-28 20:18:12 +09:00
export default async function TechStackExplorer({
locale,
contentClassName,
2026-04-28 20:18:12 +09:00
}: {
2026-05-19 19:57:18 +09:00
locale: Language
contentClassName?: string
2026-04-28 20:18:12 +09:00
}) {
2026-05-19 19:57:18 +09:00
const page = await getPageCopy(ROUTES.technologyStack, locale)
const overview = findTechnologyStackSection<TechStackOverviewSection>(
page.sections,
'techStackOverview',
'techStack.overview'
)
if (!overview.explorer) {
throw new Error(
'technology-stack techStackOverview.explorer copy is required'
)
}
const { titleLine1, titleLine2, body } = overview.explorer
return (
<section className="border-brand-dark-green/10 bg-brand-off-white border-t">
<ContentWidth
className={twMerge('pt-25 pb-29.5 md:pb-6', contentClassName)}
>
2026-05-21 00:12:32 +09:00
<Reveal
stagger
className="flex flex-col gap-3 text-brand-dark-green min-[1367px]:flex-row min-[1367px]:gap-0"
2026-05-21 00:12:32 +09:00
>
<RevealItem className="min-[1367px]:w-178.5">
2026-05-21 00:12:32 +09:00
<h2 className="text-h4-sans">
{titleLine1}
2026-05-21 00:12:32 +09:00
<br />
{titleLine2}
2026-05-21 00:12:32 +09:00
</h2>
</RevealItem>
<RevealItem className="min-[1367px]:w-83.5">
<p className="text-mono-s">{body}</p>
2026-05-21 00:12:32 +09:00
</RevealItem>
</Reveal>
2026-05-19 19:57:18 +09:00
<TechStackDiagram
data={overview}
networkingHref={ROUTES.networking}
foundationHref={ROUTES.technologyStack}
desktopAt1367
className="mt-15 min-[1367px]:mt-25"
2026-05-19 19:57:18 +09:00
/>
</ContentWidth>
</section>
)
}