Skip to content

Commit

Permalink
Updated
Browse files Browse the repository at this point in the history
  • Loading branch information
rishavchanda committed Mar 22, 2024
1 parent a9e4c3f commit 61fc3fe
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions client/src/components/Navbar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -227,11 +227,6 @@ const Navbar = ({ setOpenAuth, openAuth, currentUser }) => {
<SearchRounded sx={{ color: "inherit", fontSize: "30px" }} />
</Navlink>
{currentUser ? (
<>
<Avatar src={currentUser?.img}>{currentUser?.name[0]}</Avatar>
<TextButton onClick={() => dispatch(logout())}>Logout</TextButton>
</>
) : (
<>
<Navlink to="/favorite">
<FavoriteBorder sx={{ color: "inherit", fontSize: "28px" }} />
Expand All @@ -241,6 +236,11 @@ const Navbar = ({ setOpenAuth, openAuth, currentUser }) => {
sx={{ color: "inherit", fontSize: "28px" }}
/>
</Navlink>
<Avatar src={currentUser?.img}>{currentUser?.name[0]}</Avatar>
<TextButton onClick={() => dispatch(logout())}>Logout</TextButton>
</>
) : (
<>
<Button text="Sign In" small onClick={() => setOpenAuth(true)} />
</>
)}
Expand Down

0 comments on commit 61fc3fe

Please sign in to comment.