add nav bar to sign in flow

This commit is contained in:
talksik
2026-04-16 09:14:50 -07:00
parent 567884433d
commit 61a6904cc2
+21 -15
View File
@@ -1,4 +1,5 @@
import { useState } from "react"; import { useState } from "react";
import { WindowControls } from "@/components/window-controls";
import { EmailStep } from "./email-step"; import { EmailStep } from "./email-step";
import { CodeStep } from "./code-step"; import { CodeStep } from "./code-step";
@@ -9,21 +10,26 @@ export function LoginPage() {
const [email, setEmail] = useState(""); const [email, setEmail] = useState("");
return ( return (
<div className="flex min-h-screen items-center justify-center p-4"> <div className="flex h-screen flex-col">
<div className="w-full max-w-sm"> <div className="drag-region flex items-center gap-3 border-b px-3 py-1">
{step === "email" ? ( <WindowControls />
<EmailStep </div>
onCodeSent={(submittedEmail) => { <div className="flex flex-1 items-center justify-center p-4">
setEmail(submittedEmail); <div className="w-full max-w-sm">
setStep("code"); {step === "email" ? (
}} <EmailStep
/> onCodeSent={(submittedEmail) => {
) : ( setEmail(submittedEmail);
<CodeStep setStep("code");
email={email} }}
onBack={() => setStep("email")} />
/> ) : (
)} <CodeStep
email={email}
onBack={() => setStep("email")}
/>
)}
</div>
</div> </div>
</div> </div>
); );