mirror of
https://github.com/simstudioai/sim.git
synced 2026-09-24 15:45:35 +08:00
fix(landing): return 404 for invalid dynamic route slugs (#4182)
* v0.6.29: login improvements, posthog telemetry (#4026) * feat(posthog): Add tracking on mothership abort (#4023) Co-authored-by: Theodore Li <theo@sim.ai> * fix(login): fix captcha headers for manual login (#4025) * fix(signup): fix turnstile key loading * fix(login): fix captcha header passing * Catch user already exists, remove login form captcha * fix(landing): return 404 for invalid dynamic route slugs Add `dynamicParams = false` to all landing page dynamic routes so Next.js returns a proper 404 instead of a client-side exception for slugs not in generateStaticParams. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix(home): remove duplicate handleStopGeneration declaration Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Theodore Li <theodoreqili@gmail.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
Theodore Li
parent
842aa2c254
commit
0b36c8bcb6
@@ -9,6 +9,8 @@ import { getBaseUrl } from '@/lib/core/utils/urls'
|
||||
import { BackLink } from '@/app/(landing)/blog/[slug]/back-link'
|
||||
import { ShareButton } from '@/app/(landing)/blog/[slug]/share-button'
|
||||
|
||||
export const dynamicParams = false
|
||||
|
||||
export async function generateStaticParams() {
|
||||
const posts = await getAllPostMeta()
|
||||
return posts.map((p) => ({ slug: p.slug }))
|
||||
|
||||
@@ -20,6 +20,8 @@ const baseUrl = SITE_URL
|
||||
const bySlug = new Map(allIntegrations.map((i) => [i.slug, i]))
|
||||
const byType = new Map(allIntegrations.map((i) => [i.type, i]))
|
||||
|
||||
export const dynamicParams = false
|
||||
|
||||
/**
|
||||
* Returns up to `limit` related integration slugs.
|
||||
*
|
||||
|
||||
@@ -20,6 +20,8 @@ import {
|
||||
|
||||
const baseUrl = SITE_URL
|
||||
|
||||
export const dynamicParams = false
|
||||
|
||||
export async function generateStaticParams() {
|
||||
return ALL_CATALOG_MODELS.map((model) => ({
|
||||
provider: model.providerSlug,
|
||||
|
||||
@@ -22,6 +22,8 @@ import {
|
||||
|
||||
const baseUrl = SITE_URL
|
||||
|
||||
export const dynamicParams = false
|
||||
|
||||
export async function generateStaticParams() {
|
||||
return MODEL_PROVIDERS_WITH_CATALOGS.map((provider) => ({
|
||||
provider: provider.slug,
|
||||
|
||||
Reference in New Issue
Block a user