import React from 'react'; import { Link, useNavigate } from 'react-router-dom'; import { ExitIcon, UserIcon, LoginIcon } from '@images/Images'; import { UserProfile } from '@customTypes/Profile'; import { API } from '@api/Api'; import "@css/Login.css"; interface LoginProps { setToken: React.Dispatch>; profile?: UserProfile; setProfile: React.Dispatch>; }; const Login: React.FC = ({ setToken, profile, setProfile }) => { const navigate = useNavigate(); const _login = () => { window.location.href = "/api/v1/login"; }; const _logout = () => { setProfile(undefined); setToken(undefined); API.delete_token(); navigate("/"); }; return ( <> {profile ? ( <> {profile.profile ? ( <> ) : ( <> ) } ) : ( )} ); }; export default Login;