import { useState, useEffect } from "react"; import { NavLink } from "react-router-dom"; import Footer from "./Footer"; import Navbar from "./Navbar"; import { toast } from "react-toastify"; import LoadingIcons from "react-loading-icons"; import { useDispatch, useSelector } from "react-redux"; import { useNavigate } from "react-router-dom"; import { login } from "../redux/features/authSlice"; const initialState = { email: "", password: "", }; const Login = () => { const [formValue, setFormValue] = useState(initialState); const { loading, error } = useSelector((state) => ({ ...state.auth })); const { email, password } = formValue; const dispatch = useDispatch(); const navigate = useNavigate(); useEffect(() => { error && toast.error(error); }, [error]); const handleSubmit = (e) => { e.preventDefault(); if (email && password) { dispatch(login({ formValue, navigate, toast })); } }; const onInputChange = (e) => { let { name, value } = e.target; setFormValue({ ...formValue, [name]: value }); }; return ( <>





A beautiful, easy-to-use, and secure Investor Portal that gives your investors everything they may need

Please Login

Don't have an account?{" "} Register Forgot Password