function AuthShell({ title, subtitle, children, footer }) { const wide = useWide(); return (
§ {title.toUpperCase()}
{subtitle}
Welcome. Let's get you set up — takes 30 seconds.
{children} {footer}
); } function Field({ label, ...props }) { return ( ); } function Signup({ go, onAuth }) { const [email, setEmail] = React.useState(''); const [pw, setPw] = React.useState(''); const [name, setName] = React.useState(''); const [walletState, setWalletState] = React.useState('idle'); // idle | connecting | connected const [wallet, setWallet] = React.useState(null); const submit = (e) => { e && e.preventDefault(); if (!email || (!pw && !wallet)) return; onAuth({ name: name || email.split('@')[0], email, wallet }); go('pricing'); }; const connect = () => { setWalletState('connecting'); setTimeout(() => { setWallet('0x4A...9f2D'); setWalletState('connected'); }, 1100); }; return ( Join the desk.} footer={
Already a member? go('login')} style={{ color: TH.accent, cursor: 'pointer' }}>Log in
} >
setName(e.target.value)} placeholder="How should we call you"/> setEmail(e.target.value)} placeholder="you@domain.com"/> setPw(e.target.value)} placeholder="At least 8 characters"/> Create account →
OR
{walletState === 'connected' ? (
WALLET CONNECTED
{wallet} { setWallet(null); setWalletState('idle'); }}>Disconnect
) : ( {walletState === 'connecting' ? Connecting… : <> Continue with wallet } )} ); } function Login({ go, onAuth }) { const [email, setEmail] = React.useState(''); const [pw, setPw] = React.useState(''); const submit = (e) => { e.preventDefault(); if (!email) return; onAuth({ name: email.split('@')[0], email }); go('home'); }; return ( Welcome back.} footer={
New here? go('signup')} style={{ color: TH.accent, cursor: 'pointer' }}>Create account
} >
setEmail(e.target.value)} placeholder="you@domain.com"/> setPw(e.target.value)} placeholder="••••••••"/>
Forgot?
Log in →
OR
{ onAuth({ name: 'demo', email: 'demo@walkforward.xyz', wallet: '0x4A...9f2D' }); go('home'); }} style={{ width: '100%', padding: 14 }}> Sign in with wallet ); } Object.assign(window, { Signup, Login });