// Public business landing entry — renders LandingBusiness full-bleed.

const { useState, useEffect } = React;

function PublicBusinessLanding() {
  const [width, setWidth] = useState(typeof window !== 'undefined' ? window.innerWidth : 1280);
  useEffect(() => {
    const onResize = () => setWidth(window.innerWidth);
    window.addEventListener('resize', onResize);
    return () => window.removeEventListener('resize', onResize);
  }, []);

  const renderWidth = width < 600 ? 390 : 1280;

  return (
    <div style={{ width: '100%', minHeight: '100vh' }}>
      <LandingBusiness width={renderWidth} />
    </div>
  );
}

ReactDOM.createRoot(document.getElementById('root')).render(<PublicBusinessLanding />);
