diff --git a/apps/sim/app/(landing)/integrations/[slug]/loading.tsx b/apps/sim/app/(landing)/integrations/[slug]/loading.tsx new file mode 100644 index 00000000000..3ee348ad1fe --- /dev/null +++ b/apps/sim/app/(landing)/integrations/[slug]/loading.tsx @@ -0,0 +1,9 @@ +import { Loader } from '@/components/emcn' + +export default function IntegrationDetailLoading() { + return ( +
+ +
+ ) +} diff --git a/apps/sim/app/(landing)/models/[provider]/[model]/loading.tsx b/apps/sim/app/(landing)/models/[provider]/[model]/loading.tsx new file mode 100644 index 00000000000..af530c8b60e --- /dev/null +++ b/apps/sim/app/(landing)/models/[provider]/[model]/loading.tsx @@ -0,0 +1,9 @@ +import { Loader } from '@/components/emcn' + +export default function ModelDetailLoading() { + return ( +
+ +
+ ) +} diff --git a/apps/sim/app/(landing)/models/[provider]/loading.tsx b/apps/sim/app/(landing)/models/[provider]/loading.tsx new file mode 100644 index 00000000000..7738ad1ed18 --- /dev/null +++ b/apps/sim/app/(landing)/models/[provider]/loading.tsx @@ -0,0 +1,9 @@ +import { Loader } from '@/components/emcn' + +export default function ModelProviderLoading() { + return ( +
+ +
+ ) +} diff --git a/apps/sim/lib/auth/auth-client.ts b/apps/sim/lib/auth/auth-client.ts index ac524617290..a0ce3585b00 100644 --- a/apps/sim/lib/auth/auth-client.ts +++ b/apps/sim/lib/auth/auth-client.ts @@ -15,8 +15,17 @@ import { isBillingEnabled, isOrganizationsEnabled } from '@/lib/core/config/feat import { getBaseUrl } from '@/lib/core/utils/urls' import { SessionContext, type SessionHookResult } from '@/app/_shell/providers/session-provider' +function getAuthBaseUrl(): string { + try { + return getBaseUrl() + } catch (e) { + if (typeof window !== 'undefined') return window.location.origin + throw e + } +} + export const client = createAuthClient({ - baseURL: getBaseUrl(), + baseURL: getAuthBaseUrl(), plugins: [ adminClient(), emailOTPClient(),