mirror of
https://github.com/simstudioai/sim.git
synced 2026-01-08 22:48:14 -05:00
fix(organizations): move organization better-auth client to conditionally be included based on FF (#2367)
* fix(organizations): move organization better-auth client to conditionally be included based on FF * ack PR comment
This commit is contained in:
@@ -25,9 +25,9 @@ export const client = createAuthClient({
|
||||
stripeClient({
|
||||
subscription: true, // Enable subscription management
|
||||
}),
|
||||
organizationClient(),
|
||||
]
|
||||
: []),
|
||||
organizationClient(),
|
||||
...(env.NEXT_PUBLIC_SSO_ENABLED ? [ssoClient()] : []),
|
||||
],
|
||||
})
|
||||
@@ -42,7 +42,9 @@ export function useSession(): SessionHookResult {
|
||||
return ctx
|
||||
}
|
||||
|
||||
export const { useActiveOrganization } = client
|
||||
export const useActiveOrganization = isBillingEnabled
|
||||
? client.useActiveOrganization
|
||||
: () => ({ data: undefined, isPending: false, error: null })
|
||||
|
||||
export const useSubscription = () => {
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user