From b0c2b3df0e042de08f5da30ed413d064de4b0cc4 Mon Sep 17 00:00:00 2001 From: Tiago Ribeiro Date: Fri, 14 Apr 2023 12:55:40 +0100 Subject: [PATCH] Updated the Navbar to look more like the rest of the design --- src/components/Navbar.tsx | 66 +++++++++++++++++++++------------------ 1 file changed, 35 insertions(+), 31 deletions(-) diff --git a/src/components/Navbar.tsx b/src/components/Navbar.tsx index 581c6733..0c621703 100644 --- a/src/components/Navbar.tsx +++ b/src/components/Navbar.tsx @@ -1,6 +1,8 @@ import axios from "axios"; import Link from "next/link"; import {useRouter} from "next/router"; +import {Menubar} from "primereact/menubar"; +import {MenuItem} from "primereact/menuitem"; interface Props { profilePicture: string; @@ -16,38 +18,40 @@ export default function Navbar({profilePicture}: Props) { }); }; + const items: MenuItem[] = [ + { + label: "Home", + icon: "pi pi-fw pi-home", + url: "/", + }, + { + label: "Account", + icon: "pi pi-fw pi-user", + url: "/profile", + }, + { + label: "Exam", + icon: "pi pi-fw pi-plus-circle", + url: "/exam", + }, + { + label: "Users", + icon: "pi pi-fw pi-users", + items: [ + {label: "List", icon: "pi pi-fw pi-users", url: "/users"}, + {label: "Stats", icon: "pi pi-fw pi-chart-pie", url: "/user-stats"}, + ], + }, + { + label: "Logout", + icon: "pi pi-fw pi-power-off", + command: logout, + }, + ]; + return ( -
-
- - IELTS GPT - -
-
-
- -
-
- - -
-
+
+
); }