import { FormEvent, useState } from "react"; import { Sparkles } from "lucide-react"; import { api } from "../api/client"; import { navigate } from "../router"; import { ErrorRibbon, Panel } from "../components/ui"; export function SetupPage() { const [email, setEmail] = useState("admin@readabook.local"); const [name, setName] = useState("Conservateur"); const [password, setPassword] = useState(""); const [error, setError] = useState(); async function submit(event: FormEvent) { event.preventDefault(); setError(undefined); try { await api.bootstrap({ email, name, password }); navigate("/login"); } catch (setupError) { setError(setupError instanceof Error ? setupError.message : "Initialisation impossible"); } } return (

Premiere cle

Installer le cabinet

Un administrateur, puis les rayonnages.

Premier administrateur

); }