Skip to content

Commit

Permalink
removed unwanted check in getIdFromPath func
Browse files Browse the repository at this point in the history
  • Loading branch information
sethdivyansh committed Oct 31, 2024
1 parent 23306e7 commit e1e86e3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/LeftDrawerOrg/LeftDrawerOrg.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit e1e86e3

Please sign in to comment.