Skip to content

Commit deef19b

Browse files
committed
fix: handle display of more than 6 orgs
1 parent ad27c06 commit deef19b

File tree

2 files changed

+16
-12
lines changed

2 files changed

+16
-12
lines changed

site/src/components/Command/Command.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export const CommandList = forwardRef<
6969
>(({ className, ...props }, ref) => (
7070
<CommandPrimitive.List
7171
ref={ref}
72-
className={cn("max-h-[300px] overflow-y-auto overflow-x-hidden", className)}
72+
className={cn("max-h-[340px] overflow-y-auto overflow-x-hidden", className)}
7373
{...props}
7474
/>
7575
));

site/src/modules/management/OrganizationSidebarView.tsx

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ const OrganizationsSettingsNavigation: FC<
117117
<CommandList>
118118
<CommandGroup className="pb-2">
119119
{organizations.length > 1 && (
120-
<>
120+
<div className="flex flex-col max-h-[260px] overflow-y-auto">
121121
{organizations.map((organization) => (
122122
<Link
123123
key={organization.id}
@@ -141,18 +141,22 @@ const OrganizationsSettingsNavigation: FC<
141141
</CommandItem>
142142
</Link>
143143
))}
144-
<hr className="h-px my-2 border-none bg-border -mx-2" />
145-
</>
144+
</div>
146145
)}
147146
{permissions.createOrganization && (
148-
<Button variant="subtle" className="w-full h-8">
149-
<a
150-
href="/organizations/new"
151-
className="flex items-center gap-1 no-underline hover:text-content-primary visited:text-content-secondary"
152-
>
153-
<Plus /> Create Organization
154-
</a>
155-
</Button>
147+
<>
148+
{organizations.length > 1 && (
149+
<hr className="h-px my-2 border-none bg-border -mx-2" />
150+
)}
151+
<Button variant="subtle" className="w-full h-8">
152+
<a
153+
href="/organizations/new"
154+
className="flex items-center gap-1 no-underline hover:text-content-primary visited:text-content-secondary"
155+
>
156+
<Plus /> Create Organization
157+
</a>
158+
</Button>
159+
</>
156160
)}
157161
</CommandGroup>
158162
</CommandList>

0 commit comments

Comments
 (0)