// Stats — animated counter band. Three big numbers + labels. function Stats() { const ref = React.useRef(null); const [run, setRun] = React.useState(false); React.useEffect(() => { if (!ref.current) return; const obs = new IntersectionObserver(([entry]) => { if (entry.isIntersecting) { setRun(true); obs.disconnect(); } }, { threshold: 0.35 }); obs.observe(ref.current); return () => obs.disconnect(); }, []); const items = [ { n: 40, suffix: "+", label: "Tahun pengalaman", caption: "Sejak 26 April 1983" }, { n: 3, suffix: "", label: "Layanan plating", caption: "Zinc · Nickel Chrome · Nickel Brass" }, { n: 3, suffix: "", label: "Sektor industri", caption: "Otomotif · Rumah tangga · Office" }, ]; return (
About the Company

Mitra electroplating yang sudah teruji puluhan tahun.

PT Dinamika Electro Plating berdiri sejak tahun 1983. Kami berfokus pada jasa plating yang berkualitas, berorientasi pada kepuasan pelanggan, harga yang kompetitif, dan efisiensi proses produksi.

{items.map((it, i) => ( ))}
); } function Stat({ n, suffix, label, caption, run }) { const [val, setVal] = React.useState(0); React.useEffect(() => { if (!run) return; let s = performance.now(); const dur = 900; let raf; const tick = (t) => { const p = Math.min(1, (t - s) / dur); const eased = 1 - Math.pow(1 - p, 3); setVal(Math.round(n * eased)); if (p < 1) raf = requestAnimationFrame(tick); }; raf = requestAnimationFrame(tick); return () => cancelAnimationFrame(raf); }, [run, n]); return (
{val}{suffix}
{label}
{caption}
); } window.Stats = Stats;