Skip to content

Commit d185953

Browse files
waleedlatif1claude
andauthored
improvement(landing): scope navbar/footer to (shell) route group, align scoped 404s with root (#4246)
* improvement(landing): scope navbar/footer shell to (shell) route group, align scoped 404s with root Move integrations and models page routes into a `(shell)` route group so the Navbar+Footer layout wraps pages but not `not-found.tsx`. This lets scoped 404s render the same `<AuthBackground>` + Navbar treatment as the root `/` 404, instead of appearing inside the landing CTA footer. Extract the shared 404 markup into `<NotFoundView>` so root, integrations, and models 404s share a single source of truth. Route URLs are unchanged — route groups are URL-transparent. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * fix(landing): convert relative imports to absolute in integrations (shell) page Build failed because the move into the (shell) route group invalidated relative `./components/...` and `./data/...` imports. CLAUDE.md mandates absolute imports throughout — switching these resolves the Turbopack build errors. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 42ef2b1 commit d185953

20 files changed

Lines changed: 57 additions & 79 deletions
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
import Link from 'next/link'
2+
import { getNavBlogPosts } from '@/lib/blog/registry'
3+
import AuthBackground from '@/app/(auth)/components/auth-background'
4+
import { AUTH_PRIMARY_CTA_BASE } from '@/app/(auth)/components/auth-button-classes'
5+
import Navbar from '@/app/(landing)/components/navbar/navbar'
6+
7+
/**
8+
* Shared 404 view used by every `not-found.tsx` under the landing surface.
9+
*
10+
* Rendered outside the route-group `(shell)` layout so it owns the full
11+
* viewport (Navbar + AuthBackground decoration, no Footer), matching the
12+
* root `/` 404 treatment.
13+
*/
14+
export default async function NotFoundView() {
15+
const blogPosts = await getNavBlogPosts()
16+
return (
17+
<AuthBackground className='dark font-[430] font-season'>
18+
<main className='relative flex min-h-full flex-col text-[var(--landing-text)]'>
19+
<header className='shrink-0 bg-[var(--landing-bg)]'>
20+
<Navbar blogPosts={blogPosts} />
21+
</header>
22+
<div className='relative z-30 flex flex-1 items-center justify-center px-4 pb-24'>
23+
<div className='flex flex-col items-center gap-3'>
24+
<h1 className='text-balance font-[430] font-season text-[40px] text-white leading-[110%] tracking-[-0.02em]'>
25+
Page not found
26+
</h1>
27+
<p className='font-[430] font-season text-[color-mix(in_srgb,var(--landing-text-subtle)_60%,transparent)] text-lg leading-[125%] tracking-[0.02em]'>
28+
The page you&apos;re looking for doesn&apos;t exist or has been moved.
29+
</p>
30+
<div className='mt-3 flex items-center gap-2'>
31+
<Link href='/' className={AUTH_PRIMARY_CTA_BASE}>
32+
Return to Home
33+
</Link>
34+
</div>
35+
</div>
36+
</div>
37+
</main>
38+
</AuthBackground>
39+
)
40+
}

apps/sim/app/(landing)/integrations/[slug]/components/integration-cta-button.tsx renamed to apps/sim/app/(landing)/integrations/(shell)/[slug]/components/integration-cta-button.tsx

File renamed without changes.

apps/sim/app/(landing)/integrations/[slug]/components/integration-faq.tsx renamed to apps/sim/app/(landing)/integrations/(shell)/[slug]/components/integration-faq.tsx

File renamed without changes.

apps/sim/app/(landing)/integrations/[slug]/components/template-card-button.tsx renamed to apps/sim/app/(landing)/integrations/(shell)/[slug]/components/template-card-button.tsx

File renamed without changes.

apps/sim/app/(landing)/integrations/[slug]/loading.tsx renamed to apps/sim/app/(landing)/integrations/(shell)/[slug]/loading.tsx

File renamed without changes.

apps/sim/app/(landing)/integrations/[slug]/page.tsx renamed to apps/sim/app/(landing)/integrations/(shell)/[slug]/page.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ import Image from 'next/image'
33
import Link from 'next/link'
44
import { notFound } from 'next/navigation'
55
import { SITE_URL } from '@/lib/core/utils/urls'
6-
import { IntegrationCtaButton } from '@/app/(landing)/integrations/[slug]/components/integration-cta-button'
7-
import { IntegrationFAQ } from '@/app/(landing)/integrations/[slug]/components/integration-faq'
8-
import { TemplateCardButton } from '@/app/(landing)/integrations/[slug]/components/template-card-button'
6+
import { IntegrationCtaButton } from '@/app/(landing)/integrations/(shell)/[slug]/components/integration-cta-button'
7+
import { IntegrationFAQ } from '@/app/(landing)/integrations/(shell)/[slug]/components/integration-faq'
8+
import { TemplateCardButton } from '@/app/(landing)/integrations/(shell)/[slug]/components/template-card-button'
99
import { IntegrationIcon } from '@/app/(landing)/integrations/components/integration-icon'
1010
import { blockTypeToIconMap } from '@/app/(landing)/integrations/data/icon-mapping'
1111
import integrations from '@/app/(landing)/integrations/data/integrations.json'
File renamed without changes.

apps/sim/app/(landing)/integrations/page.tsx renamed to apps/sim/app/(landing)/integrations/(shell)/page.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import type { Metadata } from 'next'
22
import { Badge } from '@/components/emcn'
33
import { SITE_URL } from '@/lib/core/utils/urls'
4-
import { IntegrationCard } from './components/integration-card'
5-
import { IntegrationGrid } from './components/integration-grid'
6-
import { RequestIntegrationModal } from './components/request-integration-modal'
7-
import { blockTypeToIconMap } from './data/icon-mapping'
8-
import integrations from './data/integrations.json'
9-
import { POPULAR_WORKFLOWS } from './data/popular-workflows'
10-
import type { Integration } from './data/types'
4+
import { IntegrationCard } from '@/app/(landing)/integrations/components/integration-card'
5+
import { IntegrationGrid } from '@/app/(landing)/integrations/components/integration-grid'
6+
import { RequestIntegrationModal } from '@/app/(landing)/integrations/components/request-integration-modal'
7+
import { blockTypeToIconMap } from '@/app/(landing)/integrations/data/icon-mapping'
8+
import integrations from '@/app/(landing)/integrations/data/integrations.json'
9+
import { POPULAR_WORKFLOWS } from '@/app/(landing)/integrations/data/popular-workflows'
10+
import type { Integration } from '@/app/(landing)/integrations/data/types'
1111

1212
const allIntegrations = integrations as Integration[]
1313
const INTEGRATION_COUNT = allIntegrations.length
Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,11 @@
11
import type { Metadata } from 'next'
2-
import Link from 'next/link'
3-
import { AUTH_PRIMARY_CTA_BASE } from '@/app/(auth)/components/auth-button-classes'
2+
import NotFoundView from '@/app/(landing)/components/not-found-view'
43

54
export const metadata: Metadata = {
65
title: 'Page Not Found',
76
robots: { index: false, follow: true },
87
}
98

109
export default function IntegrationsNotFound() {
11-
return (
12-
<div className='flex min-h-[60vh] items-center justify-center px-4 py-24'>
13-
<div className='flex flex-col items-center gap-3'>
14-
<h1 className='text-balance font-[430] font-season text-[40px] text-white leading-[110%] tracking-[-0.02em]'>
15-
Page not found
16-
</h1>
17-
<p className='font-[430] font-season text-[color-mix(in_srgb,var(--landing-text-subtle)_60%,transparent)] text-lg leading-[125%] tracking-[0.02em]'>
18-
The page you&apos;re looking for doesn&apos;t exist or has been moved.
19-
</p>
20-
<div className='mt-3 flex items-center gap-2'>
21-
<Link href='/' className={AUTH_PRIMARY_CTA_BASE}>
22-
Return to Home
23-
</Link>
24-
</div>
25-
</div>
26-
</div>
27-
)
10+
return <NotFoundView />
2811
}

apps/sim/app/(landing)/models/[provider]/[model]/loading.tsx renamed to apps/sim/app/(landing)/models/(shell)/[provider]/[model]/loading.tsx

File renamed without changes.

0 commit comments

Comments
 (0)