import { useState } from "react"; import { Navigate } from "react-router-dom"; import { useAuth } from "../../auth/AuthProvider"; export function LoginPage() { const { login, token } = useAuth(); const [email, setEmail] = useState("admin@mrp.local"); const [password, setPassword] = useState("ChangeMe123!"); const [error, setError] = useState(null); const [isSubmitting, setIsSubmitting] = useState(false); if (token) { return ; } async function handleSubmit(event: React.FormEvent) { event.preventDefault(); setError(null); setIsSubmitting(true); try { await login(email, password); } catch (submissionError) { setError(submissionError instanceof Error ? submissionError.message : "Unable to sign in."); } finally { setIsSubmitting(false); } } return (

MRP Codex

A streamlined manufacturing operating system.

This foundation release establishes authentication, company settings, brand theming, file persistence, and planning scaffolding.

Sign in

Use the seeded admin account to access the initial platform shell.

{error ?
{error}
: null}
); }