From f962000b1f9fb19760e02b7e2f09425b97f53709 Mon Sep 17 00:00:00 2001 From: Mahyar Khanbolooki Date: Sun, 10 Aug 2025 19:35:43 +0330 Subject: [PATCH] add: logout modal to profile dropdown --- src/components/topbar/TopBar.tsx | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/components/topbar/TopBar.tsx b/src/components/topbar/TopBar.tsx index 690197d..6e3c1c7 100644 --- a/src/components/topbar/TopBar.tsx +++ b/src/components/topbar/TopBar.tsx @@ -9,6 +9,8 @@ import Dropdown from '../utils/Dropdown' import Seperator from '../utils/Seperator' import Link from 'next/link' import { useParams } from 'next/navigation' +import useToggle from '@/hooks/helpers/useToggle' +import LogoutPrompt from '@/features/general/LogoutPrompt' type Props = { profileDropState: boolean, @@ -24,6 +26,7 @@ type Props = { function TopBar({ profileDropState, toggleProfileDropState, toggleMenuState }: Props) { const params = useParams(); const { name } = params; + const { state: logoutModal, toggle: toggleLogoutModal } = useToggle(); return (
@@ -116,13 +119,25 @@ function TopBar({ profileDropState, toggleProfileDropState, toggleMenuState }: P
+ +
+ +
) }