Skip to content

Commit 51b5ee9

Browse files
waleedlatif1claude
andcommitted
improvement(landing): use emcn Loader in scoped loading.tsx, trim auth-client comment
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 7dfbe69 commit 51b5ee9

4 files changed

Lines changed: 21 additions & 12 deletions

File tree

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
import { Loader } from '@/components/emcn'
2+
13
export default function IntegrationDetailLoading() {
2-
return <div className='min-h-[60vh]' aria-hidden />
4+
return (
5+
<div className='flex min-h-[60vh] items-center justify-center bg-[var(--landing-bg)]'>
6+
<Loader animate className='h-6 w-6 text-[var(--landing-text-muted)]' />
7+
</div>
8+
)
39
}
Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
import { Loader } from '@/components/emcn'
2+
13
export default function ModelDetailLoading() {
2-
return <div className='min-h-[60vh]' aria-hidden />
4+
return (
5+
<div className='flex min-h-[60vh] items-center justify-center bg-[var(--landing-bg)]'>
6+
<Loader animate className='h-6 w-6 text-[var(--landing-text-muted)]' />
7+
</div>
8+
)
39
}
Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
import { Loader } from '@/components/emcn'
2+
13
export default function ModelProviderLoading() {
2-
return <div className='min-h-[60vh]' aria-hidden />
4+
return (
5+
<div className='flex min-h-[60vh] items-center justify-center bg-[var(--landing-bg)]'>
6+
<Loader animate className='h-6 w-6 text-[var(--landing-text-muted)]' />
7+
</div>
8+
)
39
}

apps/sim/lib/auth/auth-client.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,6 @@ import { isBillingEnabled, isOrganizationsEnabled } from '@/lib/core/config/feat
1515
import { getBaseUrl } from '@/lib/core/utils/urls'
1616
import { SessionContext, type SessionHookResult } from '@/app/_shell/providers/session-provider'
1717

18-
/**
19-
* On Next.js error-page renders (`<html id="__next_error__">`), scripts from the
20-
* root layout — including the runtime env script that populates `window.__ENV`
21-
* — are inserted but not executed by React (see vercel/next.js#63980, #82456).
22-
* Calling `getBaseUrl()` here at module evaluation would then throw and cascade
23-
* the error-page render into a blank "Application error" overlay. On the
24-
* client, auth endpoints are same-origin, so `window.location.origin` is a
25-
* correct fallback; server-side we still surface a genuine misconfig.
26-
*/
2718
function getAuthBaseUrl(): string {
2819
try {
2920
return getBaseUrl()

0 commit comments

Comments
 (0)