diff --git a/src/components/org-switcher.tsx b/src/components/org-switcher.tsx index bcb766a..ce2cc90 100644 --- a/src/components/org-switcher.tsx +++ b/src/components/org-switcher.tsx @@ -1,6 +1,7 @@ "use client" import * as React from "react" +import Link from "next/link" import { useRouter } from "next/navigation" import { IconBuilding, @@ -76,71 +77,84 @@ export function OrgSwitcher({ return ( - - - - - - {displayName} - - {hasOrgs && ( - - )} - - - + - {orgs.map((org, i) => { - const isActive = org.id === activeOrgId - const OrgIcon = - org.type === "personal" ? IconUser : IconBuilding + + + + + + + + {orgs.map((org, i) => { + const isActive = org.id === activeOrgId + const OrgIcon = + org.type === "personal" ? IconUser : IconBuilding - return ( - - {i > 0 && } - void handleOrgSwitch(org.id)} - disabled={isLoading} - className="gap-2 px-2 py-1.5" - > - - - {org.name} - - {isActive && ( - - )} - - - ) - })} - - + return ( + + {i > 0 && } + void handleOrgSwitch(org.id)} + disabled={isLoading} + className="gap-2 px-2 py-1.5" + > + + + {org.name} + + {isActive && ( + + )} + + + ) + })} + + + )