Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions src/components/auth/login/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ const Login = () => {
const { t } = useTranslate();
const navigate = useNavigate();
const [email, setEmail] = useState("");
const [password, setPassword] = useState("");
const [errors, setErrors] = useState<string>("");
const [successMessage, setSuccessMessage] = useState<string>("");
const [showEmailReverify, setShowEmailReverify] = useState<boolean>(false);
Expand Down Expand Up @@ -69,10 +68,12 @@ const Login = () => {
},
});

const handleLogin = (e: React.FormEvent) => {
const handleLogin = (e: React.FormEvent<HTMLFormElement>) => {
e.preventDefault();
setShowEmailReverify(false);
setSuccessMessage("");
const formData = new FormData(e.currentTarget);
const password = formData.get("password") as string;
Comment thread
TenzDelek marked this conversation as resolved.
const clientPassword = createPasswordHash(email, password);
loginMutation.mutate({
email,
Expand Down Expand Up @@ -111,13 +112,10 @@ const Login = () => {
</Label>
<Input
type="password"
name="password"
placeholder={t("studio.login.placeholder.password")}
className=" placeholder:text-[#b1b1b1]"
required
value={password}
onChange={(e) => {
setPassword(e.target.value);
}}
/>
</div>
<div className="flex mt-4 justify-center ">
Expand Down