// Production entry — mounts the hash-based router.
// - "/" (no hash) → FullLanding
// - "/#/login", "/#/signup", "/#/feed", etc. → web app pages from the
//   handoff bundle (prove-pages.jsx + prove-webapp.jsx)
// - "/design.html" → the original design canvas with every artboard.

function ProveRoot() {
  return <ProveRouter />;
}

function mountWhenReady() {
  if (
    typeof window.FullLanding === "function" &&
    typeof window.LoginPage === "function" &&
    typeof window.FeedPage === "function" &&
    typeof window.ProveRouter === "function"
  ) {
    const root = ReactDOM.createRoot(document.getElementById("root"));
    root.render(<ProveRoot />);
  } else {
    setTimeout(mountWhenReady, 30);
  }
}
mountWhenReady();
