Skip to content

Commit

Permalink
added a comment for isProfilePage
Browse files Browse the repository at this point in the history
  • Loading branch information
sethdivyansh committed Oct 30, 2024
1 parent aa46b0d commit 23306e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/LeftDrawerOrg/LeftDrawerOrg.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ const leftDrawerOrg = ({
// Index 2 represents the ID in paths like /member/{userId}
return segments.length > 2 ? segments[2] : '';
};
// if param id is equal to userId, then it is a profile page
const [isProfilePage, setIsProfilePage] = useState(false);
const [showDropdown, setShowDropdown] = useState(false);
const [organization, setOrganization] =
Expand All @@ -68,6 +67,7 @@ const leftDrawerOrg = ({
useEffect(() => {
// id could be userId or orgId
const id = getIdFromPath(location.pathname);
// if param id is equal to userId, then it is a profile page
setIsProfilePage(id === userId);
}, [location, userId]);

Expand Down

0 comments on commit 23306e7

Please sign in to comment.