+ {/* Start Toggle Publish Document */}
-
-
+ {/* End Toggle Publish Document */}
-
-
-
+ {/* Start Hamburger Menu */}
+
+
+
+
+
+
+
+
+ {/* End Hamburger Menu */}
);
diff --git a/hosting/src/components/Layouts/CmsLayout.tsx b/hosting/src/components/Layouts/CmsLayout.tsx
index 634180b6..81f7d2e2 100644
--- a/hosting/src/components/Layouts/CmsLayout.tsx
+++ b/hosting/src/components/Layouts/CmsLayout.tsx
@@ -4,11 +4,13 @@ import "@/assets/css/style.css";
import Header from "@/components/Header";
import Sidebar from "@/components/Sidebar";
import {useAuthentication} from "@/hooks/useAuthentication";
+import useColorMode from "@/hooks/useColorMode";
import "flatpickr/dist/flatpickr.min.css";
import React, {useState} from "react";
export default function CmsLayout({children}: {children: React.ReactNode}) {
useAuthentication();
+ useColorMode();
const [sidebarOpen, setSidebarOpen] = useState(false);
diff --git a/hosting/src/components/Sidebar/Sidebar.tsx b/hosting/src/components/Sidebar/Sidebar.tsx
index e0a3cc7a..64c3598f 100644
--- a/hosting/src/components/Sidebar/Sidebar.tsx
+++ b/hosting/src/components/Sidebar/Sidebar.tsx
@@ -1,10 +1,11 @@
"use client";
+import {useAuthentication} from "@/hooks/useAuthentication";
+import {useTanamDocumentTypes} from "@/hooks/useTanamDocumentTypes";
import Image from "next/image";
import Link from "next/link";
import {usePathname} from "next/navigation";
import {useEffect, useRef, useState} from "react";
-import {useTanamDocumentTypes} from "../../hooks/useTanamDocumentTypes";
import {SidebarExpandableMenu, SidebarExpandableMenuSubItem} from "./SidebarExpandableMenu";
import {SidebarMenuGroup} from "./SidebarMenuGroup";
import {SidebarMenuItem} from "./SidebarMenuItem";
@@ -19,6 +20,7 @@ const Sidebar = ({sidebarOpen, setSidebarOpen}: SidebarProps) => {
const trigger = useRef
(null);
const sidebar = useRef(null);
const {data: documentTypes} = useTanamDocumentTypes();
+ const {authUser, signout} = useAuthentication();
const storedSidebarExpanded = "true";
@@ -100,6 +102,17 @@ const Sidebar = ({sidebarOpen, setSidebarOpen}: SidebarProps) => {
icon={}
title="Settings"
/>
+ {authUser && (
+ <>
+
+ }
+ title="Signout"
+ onClick={signout}
+ />
+ >
+ )}
{/* */}
diff --git a/hosting/src/components/Sidebar/SidebarMenuItem.tsx b/hosting/src/components/Sidebar/SidebarMenuItem.tsx
index 22b479fd..9a4d6b3e 100644
--- a/hosting/src/components/Sidebar/SidebarMenuItem.tsx
+++ b/hosting/src/components/Sidebar/SidebarMenuItem.tsx
@@ -6,9 +6,10 @@ interface SidebarMenuProps {
href: string;
icon: React.ReactNode;
title: string;
+ onClick?: (event: React.MouseEvent) => void;
}
-export function SidebarMenuItem({href, icon, title}: SidebarMenuProps) {
+export function SidebarMenuItem({href, icon, title, onClick}: SidebarMenuProps) {
const pathname = usePathname() ?? "/";
const isActive = pathname.includes(href);
@@ -17,6 +18,7 @@ export function SidebarMenuItem({href, icon, title}: SidebarMenuProps) {