diff options
| author | FifthWit <fifthwitbusiness@gmail.com> | 2025-01-30 13:11:48 -0600 |
|---|---|---|
| committer | FifthWit <fifthwitbusiness@gmail.com> | 2025-01-30 13:11:48 -0600 |
| commit | 81342e2579165ebfdb28c749dc5225141721a419 (patch) | |
| tree | 8e5759c20b92408048fe5ac44f48e2df2a00ab9b /frontend/src/components/Login.tsx | |
| parent | fixed issues with useCallback (diff) | |
| download | lphub-81342e2579165ebfdb28c749dc5225141721a419.tar.gz lphub-81342e2579165ebfdb28c749dc5225141721a419.tar.bz2 lphub-81342e2579165ebfdb28c749dc5225141721a419.zip | |
switched to double quotes
Diffstat (limited to 'frontend/src/components/Login.tsx')
| -rw-r--r-- | frontend/src/components/Login.tsx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/frontend/src/components/Login.tsx b/frontend/src/components/Login.tsx index 093e406..1858c48 100644 --- a/frontend/src/components/Login.tsx +++ b/frontend/src/components/Login.tsx | |||
| @@ -1,10 +1,10 @@ | |||
| 1 | import React from 'react'; | 1 | import React from "react"; |
| 2 | import { Link, useNavigate } from 'react-router-dom'; | 2 | import { Link, useNavigate } from "react-router-dom"; |
| 3 | 3 | ||
| 4 | import { ExitIcon, UserIcon, LoginIcon } from '@images/Images'; | 4 | import { ExitIcon, UserIcon, LoginIcon } from "@images/Images"; |
| 5 | import { UserProfile } from '@customTypes/Profile'; | 5 | import { UserProfile } from "@customTypes/Profile"; |
| 6 | import { API } from '@api/Api'; | 6 | import { API } from "@api/Api"; |
| 7 | import '@css/Login.css'; | 7 | import "@css/Login.css"; |
| 8 | 8 | ||
| 9 | interface LoginProps { | 9 | interface LoginProps { |
| 10 | setToken: React.Dispatch<React.SetStateAction<string | undefined>>; | 10 | setToken: React.Dispatch<React.SetStateAction<string | undefined>>; |
| @@ -16,14 +16,14 @@ const Login: React.FC<LoginProps> = ({ setToken, profile, setProfile }) => { | |||
| 16 | const navigate = useNavigate(); | 16 | const navigate = useNavigate(); |
| 17 | 17 | ||
| 18 | const _login = () => { | 18 | const _login = () => { |
| 19 | window.location.href = '/api/v1/login'; | 19 | window.location.href = "/api/v1/login"; |
| 20 | }; | 20 | }; |
| 21 | 21 | ||
| 22 | const _logout = () => { | 22 | const _logout = () => { |
| 23 | setProfile(undefined); | 23 | setProfile(undefined); |
| 24 | setToken(undefined); | 24 | setToken(undefined); |
| 25 | API.delete_token(); | 25 | API.delete_token(); |
| 26 | navigate('/'); | 26 | navigate("/"); |
| 27 | }; | 27 | }; |
| 28 | 28 | ||
| 29 | return ( | 29 | return ( |