From e1e86e324193bf6c6b75269c5b34528fad742652 Mon Sep 17 00:00:00 2001 From: Divyansh Seth Date: Thu, 31 Oct 2024 13:33:41 +0530 Subject: [PATCH] removed unwanted check in getIdFromPath func --- src/components/LeftDrawerOrg/LeftDrawerOrg.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/LeftDrawerOrg/LeftDrawerOrg.tsx b/src/components/LeftDrawerOrg/LeftDrawerOrg.tsx index 0c1d118e76..26e1f70ecb 100644 --- a/src/components/LeftDrawerOrg/LeftDrawerOrg.tsx +++ b/src/components/LeftDrawerOrg/LeftDrawerOrg.tsx @@ -44,8 +44,8 @@ const leftDrawerOrg = ({ const userId = getItem('id'); const getIdFromPath = (pathname: string): string => { const segments = pathname.split('/'); - // Index 2 represents the ID in paths like /member/{userId} - return segments.length > 2 ? segments[2] : ''; + // Index 2 represents the ID in paths like /member/{userId}, /orgdash/{orgId} + return segments[2]; }; const [isProfilePage, setIsProfilePage] = useState(false); const [showDropdown, setShowDropdown] = useState(false);