/* ============================================================
Project detail + About pages
============================================================ */
const { useEffect } = React;
function ProjectDetail({ id, lang, t, nav }) {
const idx = PROJECTS.findIndex((p) => p.id === id);
const proj = PROJECTS[idx] || PROJECTS[0];
const next = PROJECTS[(idx + 1) % PROJECTS.length];
useEffect(() => { window.scrollTo(0, 0); }, [id]);
return (
{(proj.images || []).map((src, i) => (
))}
);
}
function About({ lang, t, nav }) {
useEffect(() => { window.scrollTo(0, 0); }, []);
return (
nav("/")} label={t.backHome} />
{t.aboutTitle1}
{t.aboutTitle2}
{t.aboutLede}
{t.aboutBody1}
{t.aboutBody2}
);
}
Object.assign(window, { ProjectDetail, About });