Skip to content

The Open Source DocuSign Alternative.

fix: put max height in teams section in profile dropdown (#947)

Sumit Bishtdd2984593498
diff --git a/apps/web/src/components/(dashboard)/layout/menu-switcher.tsx b/apps/web/src/components/(dashboard)/layout/menu-switcher.tsx
index 195716d64..765343d27 100644
--- a/apps/web/src/components/(dashboard)/layout/menu-switcher.tsx
+++ b/apps/web/src/components/(dashboard)/layout/menu-switcher.tsx
@@ -166,22 +166,24 @@ export const MenuSwitcher = ({ user, teams: initialTeamsData }: MenuSwitcherProp
</div>
</DropdownMenuLabel>
- {teams.map((team) => (
- <DropdownMenuItem asChild key={team.id}>
- <Link href={formatRedirectUrlOnSwitch(team.url)}>
- <AvatarWithText
- avatarFallback={formatAvatarFallback(team.name)}
- primaryText={team.name}
- secondaryText={formatSecondaryAvatarText(team)}
- rightSideComponent={
- isPathTeamUrl(team.url) && (
- <CheckCircle2 className="ml-auto fill-black text-white dark:fill-white dark:text-black" />
- )
- }
- />
- </Link>
- </DropdownMenuItem>
- ))}
+ <div className="custom-scrollbar max-h-[40vh] overflow-auto">
+ {teams.map((team) => (
+ <DropdownMenuItem asChild key={team.id}>
+ <Link href={formatRedirectUrlOnSwitch(team.url)}>
+ <AvatarWithText
+ avatarFallback={formatAvatarFallback(team.name)}
+ primaryText={team.name}
+ secondaryText={formatSecondaryAvatarText(team)}
+ rightSideComponent={
+ isPathTeamUrl(team.url) && (
+ <CheckCircle2 className="ml-auto fill-black text-white dark:fill-white dark:text-black" />
+ )
+ }
+ />
+ </Link>
+ </DropdownMenuItem>
+ ))}
+ </div>
</>
) : (
<DropdownMenuItem className="text-muted-foreground px-4 py-2" asChild>