From e40f07211f5f15dcb138e2520a76d13afd3c0cfd Mon Sep 17 00:00:00 2001 From: FifthWit Date: Thu, 30 Jan 2025 10:44:30 -0600 Subject: formatted with prettier --- frontend/src/components/Login.tsx | 103 +++++++++++++++++++------------------- 1 file changed, 52 insertions(+), 51 deletions(-) (limited to 'frontend/src/components/Login.tsx') diff --git a/frontend/src/components/Login.tsx b/frontend/src/components/Login.tsx index f1628b2..093e406 100644 --- a/frontend/src/components/Login.tsx +++ b/frontend/src/components/Login.tsx @@ -4,77 +4,78 @@ 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"; +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"; + window.location.href = '/api/v1/login'; }; const _logout = () => { setProfile(undefined); setToken(undefined); API.delete_token(); - navigate("/"); + navigate('/'); }; return ( <> - {profile - ? - ( - <> - {profile.profile ? - ( - <> - - - - - - ) - : - ( - <> - - - - - - ) - } - - ) - : - ( - - - - )} + {profile ? ( + <> + {profile.profile ? ( + <> + + + + + + ) : ( + <> + + + + + + )} + + ) : ( + + + + )} ); }; -- cgit v1.2.3