Skip to content

Commit

Permalink
Merge pull request #40 from Rushikesh-Sonawane99/release-1.0.0
Browse files Browse the repository at this point in the history
Issue #PS-1265 chore: Created dynamic routing for TL and FL profile
  • Loading branch information
itsvick authored Jul 24, 2024
2 parents 65c2615 + b442a7e commit ec998de
Show file tree
Hide file tree
Showing 3 changed files with 1,185 additions and 1,175 deletions.
7 changes: 4 additions & 3 deletions src/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ const Header: React.FC = () => {
const { t } = useTranslation();
const pathname = usePathname();
const theme = useTheme<any>();
const userId = localStorage.getItem('userId');

const StyledMenu = styled((props: MenuProps) => (
<Menu
Expand Down Expand Up @@ -69,8 +70,8 @@ const Header: React.FC = () => {
}));

const handleProfileClick = () => {
if (pathname !== '/profile') {
router.push('/profile');
if (pathname !== `/user-profile/${userId}`) {
router.push(`/user-profile/${userId}`);
logEvent({
action: 'my-profile-clicked-header',
category: 'Dashboard',
Expand Down Expand Up @@ -227,7 +228,7 @@ const Header: React.FC = () => {
open={open}
onClose={handleClose}
>
{pathname !== '/profile' && (
{pathname !== `/user-profile/${userId}` && (
<MenuItem
onClick={handleProfileClick}
disableRipple
Expand Down
Loading

0 comments on commit ec998de

Please sign in to comment.