import { useState } from 'react' import { api } from './api' import styles from './Platform.module.css' // Phase 5A §6 — the real, credentialed student login. This is now the default entry point // (see PlatformShell.jsx); EntryScreen (pilot, no password) is still reachable for // not-yet-converted accounts via the link at the bottom, not removed — see // docs/PHASE5A_STUDENT_IDENTITY_REMOTE_CLASSROOM.md §7. export default function LoginScreen({ onLogin, onShowPilotEntry, onShowForgotPassword }) { const [identifier, setIdentifier] = useState('') const [password, setPassword] = useState('') const [loading, setLoading] = useState(false) const [error, setError] = useState(null) const handleLogin = async (e) => { e.preventDefault() if (!identifier || !password) return setLoading(true) setError(null) try { const student = await api.studentLogin(identifier, password) onLogin(student) } catch (err) { setError(err.message) } finally { setLoading(false) } } return (
⎈ RootNode Academy

Sign in to continue your learning.

{error &&
{error}
}
setIdentifier(e.target.value)} required /> setPassword(e.target.value)} required />

) }