Skip to content

Commit

Permalink
Add navigation to org settings and org users pages. (SecureAI-Tools#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
JayNakrani authored Dec 4, 2023
1 parent af2e6e8 commit 4727d2c
Showing 1 changed file with 26 additions and 5 deletions.
31 changes: 26 additions & 5 deletions lib/fe/components/side-bar.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use client";

import { Avatar, Sidebar as FlowbiteSidebar } from "flowbite-react";
import { Avatar, Dropdown, Sidebar as FlowbiteSidebar } from "flowbite-react";
import {
HiArrowRight,
HiArrowLeft,
Expand Down Expand Up @@ -35,14 +35,35 @@ export function Sidebar({
? (session.user as TokenUser)
: undefined;
return (
<FlowbiteSidebar className={tw("h-screen border-r")} collapsed={collapsed}>
<FlowbiteSidebar className={tw("h-screen border-r", collapsed ? "" : "w-80")} collapsed={collapsed}>
<FlowbiteSidebar.Logo
href={FrontendRoutes.APP_HOME}
href="#"
img="/logo.png"
imgAlt="SecureAI Tools logo"
className={tw("mt-8")}
onClick={(e) => { e.preventDefault() }}
>
SecureAI Tools
<Dropdown
label={
<>SecureAI Tools</>
}
className={tw("z-50")}
placement="bottom"
inline
>
<Dropdown.Item
as="a"
href={FrontendRoutes.getOrgSettingsRoute(orgSlug)}
>
Organization settings
</Dropdown.Item>
<Dropdown.Item
as="a"
href={FrontendRoutes.getOrgUsersRoute(orgSlug)}
>
Organization users
</Dropdown.Item>
</Dropdown>
</FlowbiteSidebar.Logo>
<FlowbiteSidebar.Items>
<FlowbiteSidebar.ItemGroup>
Expand Down Expand Up @@ -95,7 +116,7 @@ export function Sidebar({
</Link>
</div>
<div className={tw("text-xs text-gray-500 dark:text-gray-400")}>
{clip(user?.email ?? "", 16)}
{clip(user?.email ?? "", 24)}
</div>
</div>
)}
Expand Down

0 comments on commit 4727d2c

Please sign in to comment.