diff --git a/web/app/login/page.tsx b/web/app/login/page.tsx index faf3be8..af10142 100644 --- a/web/app/login/page.tsx +++ b/web/app/login/page.tsx @@ -7,112 +7,105 @@ import { Button, Card } from "@/components/ui"; import { Logo } from "@/components/Logo"; export default function LoginPage() { - const [email, setEmail] = useState(""); - const [password, setPassword] = useState(""); - const [orgName, setOrgName] = useState(""); + const [email, setEmail] = useState(""); + const [password, setPassword] = useState(""); + const [orgName, setOrgName] = useState(""); - useEffect(() => { - (async () => { - try { - const s = await auth.bootstrapStatus(); - if (s.needs_setup) { - window.location.href = "/setup"; - return; - } - if (s.org_name) setOrgName(s.org_name); - } catch { - - } - try { - await auth.me(); - window.location.href = "/"; - } catch { - - } - })(); - }, []); + useEffect(() => { + (async () => { + try { + const s = await auth.bootstrapStatus(); + if (s.needs_setup) { + window.location.href = "/setup"; + return; + } + if (s.org_name) setOrgName(s.org_name); + } catch {} + try { + await auth.me(); + window.location.href = "/"; + } catch {} + })(); + }, []); - const { mutate: signIn, isPending, error } = useMutation({ - mutationFn: () => auth.login(email, password), - onSuccess: () => { - window.location.href = "/"; - }, - }); + const { + mutate: signIn, + isPending, + error, + } = useMutation({ + mutationFn: () => auth.login(email, password), + onSuccess: () => { + window.location.href = "/"; + }, + }); - function handleSubmit(e: React.FormEvent) { - e.preventDefault(); - signIn(); - } + function handleSubmit(e: React.FormEvent) { + e.preventDefault(); + signIn(); + } - return ( -
SSO must be enabled for this organization by an administrator.
+- SSO must be enabled for this organization by an administrator. -
-