Skip to content

Commit

Permalink
✏️ Fix typo to display the right project
Browse files Browse the repository at this point in the history
  • Loading branch information
naelob committed Apr 25, 2024
1 parent 9bb86dc commit 589156e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion apps/client-ts/src/components/shared/team-switcher.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,11 @@ export default function TeamSwitcher({ className, userId }: TeamSwitcherProps) {
aria-label="Select a team"
className={cn("w-[250px] justify-between", className)}
>
{projects && projects.length > 0 ? projects[0].name : "No projects found"}
{
projects && projects.length > 0
? projects.find(p => p.id_project === idProject)?.name || "Selected project not found"
: "No projects found"
}
<CaretSortIcon className="ml-auto h-4 w-4 shrink-0 opacity-50" />
</Button>
</PopoverTrigger>
Expand Down

0 comments on commit 589156e

Please sign in to comment.