import { createRoot } from 'react-dom/client'; import App from './App'; import ProofingGallery from './components/ProofingGallery'; import JoinPage from './components/JoinPage'; import './styles.css'; const root = document.getElementById('root'); if (!root) throw new Error('root element missing'); // Proofing links are public: /g/ renders the gallery straight away and // never mounts the editor or asks for a session. const galleryMatch = /^\/g\/([A-Za-z0-9_-]+)\/?$/.exec(window.location.pathname); // Invite links are public too: the token decides whether signup is allowed. const joinMatch = /^\/join\/([A-Za-z0-9_-]+)\/?$/.exec(window.location.pathname); createRoot(root).render( galleryMatch ? ( ) : joinMatch ? ( ) : ( ), );