Skip to content

Commit

Permalink
Issue platzi#14: Cuando cerramos sesión se nos redirige a SignIn
Browse files Browse the repository at this point in the history
  • Loading branch information
JuanmaNavarro369 committed Mar 20, 2024
1 parent 8c596ec commit c3c7e91
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Components/Navbar/index.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useContext } from 'react'
import { NavLink, useLocation } from 'react-router-dom'
import { Link, NavLink, useLocation } from 'react-router-dom'
import { ShoppingBagIcon } from '@heroicons/react/24/solid'
import { ShoppingCartContext } from '../../Context'

Expand Down Expand Up @@ -109,9 +109,11 @@ const Navbar = () => {

{
(context.logout === false) ? (
<Link to='/sign-in'>
<button
onClick={() => context.setLogout(true)}
>Log Out</button>
</Link>
) : (
<li>
<NavLink
Expand Down

0 comments on commit c3c7e91

Please sign in to comment.