Skip to content

Commit

Permalink
[fix]: error in /client route
Browse files Browse the repository at this point in the history
  • Loading branch information
sanam2405 committed Jan 5, 2024
1 parent 28b628a commit 47f9958
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
3 changes: 2 additions & 1 deletion frontend/src/components/Client.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ function Client() {

const checker = () => {
if (localStorage.getItem('user') !== null) {
;<Map />
return <Map />
// eslint-disable-next-line no-else-return
} else {
navigate('/login')
}
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/FriendsPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ function FriendsPage() {
size='large'
color='success'
onClick={handleClick}
startIcon={<ExitToAppRoundedIcon />}
endIcon={<ExitToAppRoundedIcon />}
>
Logout
</Button>
Expand Down
7 changes: 3 additions & 4 deletions frontend/src/components/Map.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ import TextField from '@mui/material/TextField'
import MenuItem from '@mui/material/MenuItem'
import Stack from '@mui/material/Stack'
import Button from '@mui/material/Button'
import TravelExploreRoundedIcon from '@mui/icons-material/TravelExploreRounded'
import ExitToAppRoundedIcon from '@mui/icons-material/ExitToAppRounded'

import AccountCircleIcon from '@mui/icons-material/AccountCircle'
import { GoogleMap, Marker, useJsApiLoader } from '@react-google-maps/api'
import io from 'socket.io-client'
import '../styles/Map.css'
Expand Down Expand Up @@ -263,7 +262,7 @@ function Map() {
onClick={() => {
navigate('/friendsPage')
}}
startIcon={<TravelExploreRoundedIcon />}
startIcon={<AccountCircleIcon />}
>
Profile
</Button>
Expand All @@ -272,7 +271,7 @@ function Map() {
size='large'
color='success'
onClick={handleClick}
startIcon={<ExitToAppRoundedIcon />}
endIcon={<ExitToAppRoundedIcon />}
>
Logout
</Button>
Expand Down

0 comments on commit 47f9958

Please sign in to comment.