create sig in flow LO
This commit is contained in:
54
src/routes/auth/mail.tsx
Normal file
54
src/routes/auth/mail.tsx
Normal file
@@ -0,0 +1,54 @@
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { Input } from "@/components/ui/input";
|
||||
import { createFileRoute, useNavigate } from "@tanstack/react-router";
|
||||
import { useState } from "react";
|
||||
|
||||
export const Route = createFileRoute("/auth/mail")({
|
||||
component: RouteComponent,
|
||||
});
|
||||
|
||||
function RouteComponent() {
|
||||
const [email, setEmail] = useState("");
|
||||
const navigate = useNavigate();
|
||||
|
||||
const handleSubmit = () => {
|
||||
if (email.trim() === "") return;
|
||||
navigate({
|
||||
to: "/auth/code",
|
||||
viewTransition: { types: ["warp"] },
|
||||
});
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="flex items-center justify-center h-full gap-10 tracking-[-2%] flex-col">
|
||||
<div className="text-brand-gray text-center">
|
||||
<p className="font-medium text-[48px] leading-[120%] ">
|
||||
Welcome to Cytonic!
|
||||
</p>
|
||||
<p className="font-medium text-[32px] leading-[120%]">Sign in</p>
|
||||
</div>
|
||||
|
||||
<div className="space-y-6 w-[300px]">
|
||||
<Input
|
||||
label="Email"
|
||||
placeholder="Email@example.com"
|
||||
value={email}
|
||||
onChange={(e) => setEmail(e.target.value)}
|
||||
onKeyDown={(e) => {
|
||||
if (e.key === "Enter") {
|
||||
handleSubmit();
|
||||
}
|
||||
}}
|
||||
/>
|
||||
|
||||
<Button
|
||||
className="text-[18px] w-full"
|
||||
disabled={email.trim() === ""}
|
||||
onClick={handleSubmit}
|
||||
>
|
||||
Send code
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user