import Button from "../../Components/Button/Button"; import styles from "../../styles"; import citc_logo from "../../assets/citc_logo.jpg"; import Popup from "reactjs-popup"; import "reactjs-popup/dist/index.css"; import { useEffect, useState } from "react"; import LoginModal from "../../Components/LoginModal/LoginModal"; import RegisterModal from "../../Components/RegisterModal/RegisterModal"; import { useSelector } from "react-redux"; import { useNavigate } from "react-router-dom"; import { RootState } from "../../Components/Plugins/Redux/Store/Store"; import ResetPasswordModal from "../../Components/ResetPasswordModal/ResetPasswordModal"; export default function LandingPage() { const [loginmodalOpen, SetloginmodalOpen] = useState(false); const [registermodalOpen, SetRegisterModalOpen] = useState(false); const [resetmodalOpen, SetResetModalOpen] = useState(false); const authenticated = useSelector((state: RootState) => state.auth.value); const navigate = useNavigate(); useEffect(() => { if (authenticated) { navigate("/dashboard"); console.log("Already logged in. Redirecting to dashboard page"); } }, [authenticated, navigate]); return (

CITC EQUIPMENT
TRACKER

); }