/* ------------------------------------------------------------------ * * Story page (i18n) * ------------------------------------------------------------------ */ function PageStory({ navigate, anchor }) { const { t } = useLang(); const values = [0,1,2,3,4,5].map(i => ({ title: t(`values.${i}.title`), desc: t(`values.${i}.desc`) })); const steps = [0,1,2,3,4].map(i => ({ name: t(`steps.${i}.name`), desc: t(`steps.${i}.desc`) })); const materials = [0,1,2,3,4,5,6,7].map(i => ({ title: t(`mat.${i}.title`), desc: t(`mat.${i}.desc`) })); React.useEffect(() => { if (!anchor) { window.scrollTo({ top: 0 }); return; } let raf = 0, tries = 0; const go = () => { const el = document.getElementById(anchor); if (el) { window.scrollTo({ top: el.getBoundingClientRect().top + window.scrollY - 88, behavior: "smooth" }); } else if (tries++ < 30) { raf = requestAnimationFrame(go); } }; raf = requestAnimationFrame(go); return () => cancelAnimationFrame(raf); }, [anchor]); return (
{t("story.lead")}
{t("story.body1")}
{t("story.body2")}
{v.desc}
{s.desc}
{m.desc}
{t("story.cta.body")}