From 1db9a273a0f1f606babd086fc795c8e4f40357f6 Mon Sep 17 00:00:00 2001 From: MarcEricMartel <74071476+MarcEricMartel@users.noreply.github.com> Date: Sun, 6 Nov 2022 04:55:24 -0800 Subject: [PATCH] Update Topbar.js --- .../grosses-mitaines-ui/src/components/Topbar.js | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/GrossesMitaines/grosses-mitaines-ui/src/components/Topbar.js b/GrossesMitaines/grosses-mitaines-ui/src/components/Topbar.js index 7bd607b..5823d25 100644 --- a/GrossesMitaines/grosses-mitaines-ui/src/components/Topbar.js +++ b/GrossesMitaines/grosses-mitaines-ui/src/components/Topbar.js @@ -1,12 +1,12 @@ -import React from "react"; +import React, { useEffect, useState } from "react"; import Container from 'react-bootstrap/Container'; import Nav from 'react-bootstrap/Nav'; import Navbar from 'react-bootstrap/Navbar'; import { Link } from "react-router-dom"; import Dropdown from "react-bootstrap/Dropdown"; - const Topbar = () => { + const user = null; return ( @@ -31,12 +31,22 @@ const Topbar = () => { Vie privée + {user !== null && user.hasCookie === false && Connexion + } + {user !== null && user.hasCookie === false && + + S'inscrire + + } + {user !== null && user.hasCookie === true && Déconnexion + } + {user !== null && user.hasCookie === true && user.role === "Administrateur" && Gestion @@ -50,6 +60,7 @@ const Topbar = () => { + }