function App() {
  const animations = true;

  React.useEffect(() => {
    return setupReveal();
  }, []);

  React.useEffect(() => {
    const id = window.location.hash.slice(1);
    if (!id) return;
    const go = () => { const el = document.getElementById(id); if (el) scrollToId(id); };
    const r1 = requestAnimationFrame(() => setTimeout(go, 120));
    return () => cancelAnimationFrame(r1);
  }, []);

  return (
    <React.Fragment>
      <Navbar />
      <main>
        <Hero />
        <Stats animate={animations} />
        <Portal />
        <About />
        <ProductsShowcase />
        <Testimonials />
        <Showroom />
        <Contact />
      </main>
      <Footer />
      <WaFloat />
    </React.Fragment>
  );
}

ReactDOM.createRoot(document.getElementById("root")).render(<App />);
