aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packages/lib/auth-context.tsx17
1 files changed, 9 insertions, 8 deletions
diff --git a/packages/lib/auth-context.tsx b/packages/lib/auth-context.tsx
index a8a296c7..7e6462fa 100644
--- a/packages/lib/auth-context.tsx
+++ b/packages/lib/auth-context.tsx
@@ -39,14 +39,15 @@ export function AuthProvider({ children }: { children: ReactNode }) {
useEffect(() => {
if (session?.session.activeOrganizationId) {
authClient.organization.getFullOrganization().then((org) => {
- if (org.metadata?.isConsumer === true) {
- setOrg(org)
- } else {
- const consumerOrg = orgs?.find((o) => o.metadata?.isConsumer === true)
- if (consumerOrg) {
- setActiveOrg(consumerOrg.slug)
- }
- }
+ // TODO: Uncomment this when we have a way to handle consumer organizations better way
+ //if (org.metadata?.isConsumer === true) {
+ setOrg(org)
+ //} else {
+ // const consumerOrg = orgs?.find((o) => o.metadata?.isConsumer === true)
+ // if (consumerOrg) {
+ // setActiveOrg(consumerOrg.slug)
+ // }
+ //}
})
}
}, [session?.session.activeOrganizationId, orgs])