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

fixes: #942
This commit is contained in:
Sumit Bisht
2024-02-22 11:19:54 +05:30
committed by GitHub
parent a48bda0d27
commit dd29845934
@@ -166,22 +166,24 @@ export const MenuSwitcher = ({ user, teams: initialTeamsData }: MenuSwitcherProp
</div> </div>
</DropdownMenuLabel> </DropdownMenuLabel>
{teams.map((team) => ( <div className="custom-scrollbar max-h-[40vh] overflow-auto">
<DropdownMenuItem asChild key={team.id}> {teams.map((team) => (
<Link href={formatRedirectUrlOnSwitch(team.url)}> <DropdownMenuItem asChild key={team.id}>
<AvatarWithText <Link href={formatRedirectUrlOnSwitch(team.url)}>
avatarFallback={formatAvatarFallback(team.name)} <AvatarWithText
primaryText={team.name} avatarFallback={formatAvatarFallback(team.name)}
secondaryText={formatSecondaryAvatarText(team)} primaryText={team.name}
rightSideComponent={ secondaryText={formatSecondaryAvatarText(team)}
isPathTeamUrl(team.url) && ( rightSideComponent={
<CheckCircle2 className="ml-auto fill-black text-white dark:fill-white dark:text-black" /> isPathTeamUrl(team.url) && (
) <CheckCircle2 className="ml-auto fill-black text-white dark:fill-white dark:text-black" />
} )
/> }
</Link> />
</DropdownMenuItem> </Link>
))} </DropdownMenuItem>
))}
</div>
</> </>
) : ( ) : (
<DropdownMenuItem className="text-muted-foreground px-4 py-2" asChild> <DropdownMenuItem className="text-muted-foreground px-4 py-2" asChild>