This commit is contained in:
Alex Holliday committed 2026-02-06 21:35:25 +00:00
1 parent 514570da78
commit 8f2072e497
6 files changed
+3 -222

No files matched your search

+3 -8
View File
@@ -19,7 +19,7 @@ const LoginPage = () => {
const { schema, defaults } = useLoginForm();
const { control, handleSubmit, setError } = useForm<LoginFormData>({
const { control, handleSubmit } = useForm<LoginFormData>({
resolver: zodResolver(schema),
defaultValues: defaults,
});
@@ -30,13 +30,8 @@ const LoginPage = () => {
const result = await post("/auth/login", data);
if (result?.success) {
console.log(result);
// dispatch(setAuthState(result));
// navigate("/uptime");
} else if (result?.msg === "Incorrect password") {
setError("password", {
message: "auth.login.errors.password.incorrect",
});
dispatch(setAuthState(result));
navigate("/uptime");
}
};