diff --git a/vite/src/views/main-sidebar/components/OrgDropdown.tsx b/vite/src/views/main-sidebar/components/OrgDropdown.tsx index 6b85ded60..d07b3e092 100644 --- a/vite/src/views/main-sidebar/components/OrgDropdown.tsx +++ b/vite/src/views/main-sidebar/components/OrgDropdown.tsx @@ -50,9 +50,7 @@ export const OrgDropdown = () => { // Exclude the active organization from the orgs list (this makes it easier for users to understand which org is active) if (activeOrganization && orgs) { - orgs = orgs.filter( - (o) => o.id !== activeOrganization.id - ); + orgs = orgs.filter((o) => o.id !== activeOrganization.id); } const [dialogType, setDialogType] = useState<"create" | "manage" | null>( @@ -61,11 +59,11 @@ export const OrgDropdown = () => { const { data: session } = useSession(); - //remove the currect active org from the orgs data - const inactiveOrgs = useMemo(() => { - if (!orgs || !org) return []; - return orgs.filter((orgItem: any) => orgItem.id !== org.id); - }, [org, orgs]); + // //remove the currect active org from the orgs data + // const inactiveOrgs = useMemo(() => { + // if (!orgs || !org) return []; + // return orgs.filter((orgItem: any) => orgItem.id !== org.id); + // }, [org, orgs]); // To pre-fetch data useMemberships(); @@ -170,24 +168,27 @@ export const OrgDropdown = () => { )} - - - - - Switch Organization - - - - {inactiveOrgs?.map((org) => ( - - ))} - - - + {orgs && orgs.length > 0 && ( + <> + + + + Switch Organization + + + + {orgs.map((org) => ( + + ))} + + + + + )} @@ -201,8 +202,6 @@ const SwitchOrgItem = ({ org, setDropdownOpen }: any) => { const [loading, setLoading] = useState(false); const [_, setSearchParams] = useSearchParams(); - const { mutate } = useOrg(); - const handleSwitchOrg = async (orgId: string) => { setLoading(true); diff --git a/vite/src/views/products/features/components/CreateFeature.tsx b/vite/src/views/products/features/components/CreateFeature.tsx index 2f59444d5..14f32850b 100644 --- a/vite/src/views/products/features/components/CreateFeature.tsx +++ b/vite/src/views/products/features/components/CreateFeature.tsx @@ -90,7 +90,7 @@ export const CreateFeature = ({ return ( <> - + Create Feature