Skip to content

Commit 14ba63f

Browse files
committed
fix: ensure the popover closes when navigating to a new page
1 parent 43690ad commit 14ba63f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

site/src/modules/management/OrganizationSidebarView.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ import { ChevronDown, Plus } from "lucide-react";
2222
import { useDashboard } from "modules/dashboard/useDashboard";
2323
import { type FC, useState } from "react";
2424
import { useNavigate } from "react-router-dom";
25-
import { Link } from "react-router-dom";
2625

2726
export interface OrganizationWithPermissions extends Organization {
2827
permissions: AuthorizationResponse;
@@ -153,7 +152,9 @@ const OrganizationsSettingsNavigation: FC<
153152
className="flex justify-center data-[selected=true]:bg-transparent"
154153
onSelect={() => {
155154
setIsPopoverOpen(false);
156-
navigate("/organizations/new");
155+
setTimeout(() => {
156+
navigate("/organizations/new");
157+
}, 200);
157158
}}
158159
>
159160
<Plus /> Create Organization

0 commit comments

Comments
 (0)