Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5423bde

Browse files
committed
fix: replace create org button with command item
1 parent 4efa82a commit 5423bde

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

site/src/modules/management/OrganizationSidebarView.tsx

+10-9
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ const OrganizationsSettingsNavigation: FC<
115115
</Button>
116116
</PopoverTrigger>
117117
<PopoverContent align="start" className="w-60">
118-
<Command>
118+
<Command loop>
119119
<CommandList>
120120
<CommandGroup className="pb-2">
121121
{organizations.length > 1 && (
@@ -149,14 +149,15 @@ const OrganizationsSettingsNavigation: FC<
149149
{organizations.length > 1 && (
150150
<hr className="h-px my-2 border-none bg-border -mx-2" />
151151
)}
152-
<Button asChild variant="subtle" className="w-full h-8">
153-
<a
154-
href="/organizations/new"
155-
className="flex items-center gap-1 no-underline text-content-secondary hover:text-content-primary visited:text-content-secondary"
156-
>
157-
<Plus /> Create Organization
158-
</a>
159-
</Button>
152+
<CommandItem
153+
className="flex justify-center"
154+
onSelect={() => {
155+
setIsPopoverOpen(false);
156+
navigate("/organizations/new");
157+
}}
158+
>
159+
<Plus /> Create Organization
160+
</CommandItem>
160161
</>
161162
)}
162163
</CommandGroup>

0 commit comments

Comments
 (0)