@@ -6,11 +6,10 @@ import Input from "../form/input/InputField";
|
||||
import Checkbox from "../form/input/Checkbox";
|
||||
import Button from "../ui/button/Button";
|
||||
import { useAuthStore } from "../../store/authStore";
|
||||
import LogoutReasonBanner from "./LogoutReasonBanner";
|
||||
|
||||
export default function SignInForm() {
|
||||
const [showPassword, setShowPassword] = useState(false);
|
||||
const [rememberMe, setRememberMe] = useState(false);
|
||||
const [isChecked, setIsChecked] = useState(false);
|
||||
const [email, setEmail] = useState("");
|
||||
const [password, setPassword] = useState("");
|
||||
const [error, setError] = useState("");
|
||||
@@ -28,7 +27,7 @@ export default function SignInForm() {
|
||||
}
|
||||
|
||||
try {
|
||||
await login(email, password, rememberMe);
|
||||
await login(email, password);
|
||||
// Redirect to the page user was trying to access, or home
|
||||
const from = (location.state as any)?.from?.pathname || "/";
|
||||
navigate(from, { replace: true });
|
||||
@@ -47,9 +46,6 @@ export default function SignInForm() {
|
||||
</div>
|
||||
<div className="flex flex-col justify-center flex-1 w-full max-w-md mx-auto">
|
||||
<div>
|
||||
{/* Show logout reason if user was logged out */}
|
||||
<LogoutReasonBanner />
|
||||
|
||||
<div className="mb-5 sm:mb-8">
|
||||
<h1 className="mb-2 font-semibold text-gray-800 text-title-sm dark:text-white/90 sm:text-title-md">
|
||||
Sign In
|
||||
@@ -156,9 +152,9 @@ export default function SignInForm() {
|
||||
</div>
|
||||
<div className="flex items-center justify-between">
|
||||
<div className="flex items-center gap-3">
|
||||
<Checkbox checked={rememberMe} onChange={setRememberMe} />
|
||||
<Checkbox checked={isChecked} onChange={setIsChecked} />
|
||||
<span className="block font-normal text-gray-700 text-theme-sm dark:text-gray-400">
|
||||
Remember me for 20 days
|
||||
Keep me logged in
|
||||
</span>
|
||||
</div>
|
||||
<Link
|
||||
|
||||
Reference in New Issue
Block a user