diff --git a/src/Components/NavBar/NavBar.jsx b/src/Components/NavBar/NavBar.jsx index c63f8468..7b1c11a8 100755 --- a/src/Components/NavBar/NavBar.jsx +++ b/src/Components/NavBar/NavBar.jsx @@ -1,11 +1,11 @@ import React, {useReducer, useContext } from "react"; +import axios from "axios"; import "./NavBar.css"; import burger from '../../Assets/Images/burger-min.png'; -import { Link } from "react-router-dom"; import Logo from '../../Assets/Images/logo-min.png'; +import { Link } from "react-router-dom"; import { GlobalState } from '../../GlobalState'; import {StyledHr} from '../../Layout/Hr/styledHr'; -import axios from "axios"; import { AiOutlineShoppingCart } from 'react-icons/ai'; @@ -29,28 +29,90 @@ const NavBar = () => { const adminRouter = () => { return ( <> - Create Product - Products - {/* Admin User Management */} + {/* Create Product + Products */} Users +
  • + Products +
    + Create Product + View Products +
    +
  • + {/* Admin User Management */} )}; + const publicRouter = () => { + return ( + <> + Home + Blog +
  • + Portfolio +
    + Backend Portfolio + Project Case Studies +
    +
  • + About + Contact + + )}; + const loggedInRouter = () => { return ( <> - Profile - Shop - History -
    - {cart.length} - - {" "} - - {/* Shoppingcart */} - -
    - Settings + {/* Create Post */} + { + isAdmin ? + null + : + Home + } +
  • + Blog +
    + Create Post + View Blog +
    +
  • +
  • + Shop +
    + View Shop + View Order History +
    + {cart.length} + + {" "} + + {/* Shoppingcart */} + +
    +
    +
  • +
  • + Settings +
    + View Profile + View Settings +
    +
  • Logout )}; @@ -66,33 +128,20 @@ const NavBar = () => {