Skip to content

Commit

Permalink
quitar estadisticas si no estas logeado
Browse files Browse the repository at this point in the history
  • Loading branch information
uo276026 committed Mar 26, 2024
1 parent 61641a2 commit 0f0fb44
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions webapp/src/components/Pages/Layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,13 @@ import { Outlet, Link } from "react-router-dom";
import React, { useState, useEffect } from 'react';
import {Container, Nav, Navbar, NavDropdown} from 'react-bootstrap';



const Layout = ({ isLogged, setIsLogged }) => {

function onLogout(){
localStorage.setItem('isLogged', JSON.stringify(false));
setIsLogged(false);
}


return (
<>
<Navbar collapseOnSelect expand="lg" className="bg-body-tertiary">
Expand All @@ -20,7 +17,9 @@ import {Container, Nav, Navbar, NavDropdown} from 'react-bootstrap';
<Navbar.Toggle aria-controls="responsive-navbar-nav" />
<Navbar.Collapse id="responsive-navbar-nav">
<Nav className="me-auto">
<Nav.Link href="stats">Estadísticas</Nav.Link>
{isLogged &&
<Nav.Link href="stats">Estadísticas</Nav.Link>
}
</Nav>
<Nav>
{isLogged ? (
Expand Down

0 comments on commit 0f0fb44

Please sign in to comment.