Skip to content

Fix/topbar avatar click does not navigate to profile #61

Description

@dcl10

Description

Clicking the avatar in the TopBar does nothing. The TopBar fires onNavigate('profile-me') on avatar click, but AppShell has no destination mapped for that route id — only my-projects and matches are handled.

Root cause (two files):

  • frontend/components/shared/TopBar.tsx — avatar onClick calls onNavigate?.('profile-me')
  • frontend/app/profile/_AppShell.tsxhandleNavigate destinations map is missing 'profile-me'

Fix: Add userId as a prop to AppShell, then add 'profile-me': /profile/${userId}`` to the destinations map in `handleNavigate`. Both `app/profile/layout.tsx` and `app/projects/layout.tsx` already fetch `currentUser` and can pass `currentUser.id` down.

Tasks

  • Add userId: string prop to AppShell in frontend/app/profile/_AppShell.tsx
  • Add 'profile-me': \/profile/${userId}`to thedestinationsmap insidehandleNavigate`
  • Pass currentUser.id to <AppShell> in frontend/app/profile/layout.tsx
  • Pass currentUser.id to <AppShell> in frontend/app/projects/layout.tsx

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions