// QTG main app
const App = () => (
  <>
    <Nav />
    <Hero />
    <TickerWrapper />
    <ProblemSection />
    <ArchitectureSection />
    <PlatformsSection />
    <ApplicationsSection />
    <IndustriesSection />
    <WhySection />
    <GlobalSection />
    <HomeUpcomingEvents />
    <InsightsSection />
    <CTASection />
    <Footer />
    <QtgTweaks />
  </>
);

const TickerWrapper = () => {
  const [show, setShow] = React.useState(true);
  React.useEffect(()=>{
    const obs = new MutationObserver(()=>{
      setShow(document.body.dataset.ticker !== 'off');
    });
    obs.observe(document.body, {attributes:true, attributeFilter:['data-ticker']});
    return () => obs.disconnect();
  }, []);
  if (!show) return null;
  return <Ticker />;
};

const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(<App/>);
