From 8746b0ba6501aaa432f0c16df883894567bd5d9f Mon Sep 17 00:00:00 2001 From: sara-pervana Date: Tue, 21 Nov 2023 17:56:43 +0100 Subject: [PATCH] Orun changes - added router pages for DLG and AP --- pkgs/ui/src/app/access-point/page.tsx | 9 +++ .../app/distributed-ledger-gateway/page.tsx | 9 +++ pkgs/ui/src/components/sidebar/index.tsx | 58 +++++++++++++++---- 3 files changed, 64 insertions(+), 12 deletions(-) create mode 100644 pkgs/ui/src/app/access-point/page.tsx create mode 100644 pkgs/ui/src/app/distributed-ledger-gateway/page.tsx diff --git a/pkgs/ui/src/app/access-point/page.tsx b/pkgs/ui/src/app/access-point/page.tsx new file mode 100644 index 0000000..c2fea8a --- /dev/null +++ b/pkgs/ui/src/app/access-point/page.tsx @@ -0,0 +1,9 @@ +"use client"; + +export default function AccessPoint() { + return ( +
+ Access Point Page +
+ ) +} \ No newline at end of file diff --git a/pkgs/ui/src/app/distributed-ledger-gateway/page.tsx b/pkgs/ui/src/app/distributed-ledger-gateway/page.tsx new file mode 100644 index 0000000..93da773 --- /dev/null +++ b/pkgs/ui/src/app/distributed-ledger-gateway/page.tsx @@ -0,0 +1,9 @@ +"use client"; + +export default function DLG() { + return ( +
+ DLG Page +
+ ) +} \ No newline at end of file diff --git a/pkgs/ui/src/components/sidebar/index.tsx b/pkgs/ui/src/components/sidebar/index.tsx index c75bfa2..b862b89 100644 --- a/pkgs/ui/src/components/sidebar/index.tsx +++ b/pkgs/ui/src/components/sidebar/index.tsx @@ -8,13 +8,16 @@ import { ListItemText, } from "@mui/material"; import Image from "next/image"; -import { ReactNode } from "react"; +import React, { ReactNode } from "react"; import { tw } from "@/utils/tailwind"; -import AssignmentIndIcon from "@mui/icons-material/AssignmentInd"; import Link from "next/link"; -import WysiwygIcon from "@mui/icons-material/Wysiwyg"; import ChevronLeftIcon from "@mui/icons-material/ChevronLeft"; +import HomeIcon from '@mui/icons-material/Home'; +import HubIcon from '@mui/icons-material/Hub'; +import PersonIcon from '@mui/icons-material/Person'; +import RouterIcon from '@mui/icons-material/Router'; +import StorageIcon from '@mui/icons-material/Storage'; type MenuEntry = { icon: ReactNode; @@ -27,17 +30,41 @@ type MenuEntry = { const menuEntries: MenuEntry[] = [ { - icon: , - label: "Freelance", + icon: , + label: "Home", to: "/", disabled: false, }, { - icon: , - label: "Blog", - to: "/blog", + icon: , + label: "Entities", + to: "/entities", disabled: true, }, + { + icon: , + label: "C1", + to: "/client-1", + disabled: false, + }, + { + icon: , + label: "C2", + to: "/client-2", + disabled: false, + }, + { + icon: , + label: "AP", + to: "/access-point", + disabled: false, + }, + { + icon: , + label: "DLG", + to: "/distributed-ledger-gateway", + disabled: false, + } ]; const hideSidebar = tw`-translate-x-14 lg:-translate-x-64`; @@ -50,17 +77,22 @@ interface SidebarProps { export function Sidebar(props: SidebarProps) { const { show, onClose } = props; + const [activeMenuItem, setActiveMenuItem] = React.useState('/'); + + const handleMenuItemClick = (path: string) => { + setActiveMenuItem(path); + }; + return (