diff --git a/src/app/api/public/posts/route.ts b/src/app/api/public/posts/route.ts index e380f15..03237bb 100644 --- a/src/app/api/public/posts/route.ts +++ b/src/app/api/public/posts/route.ts @@ -3,7 +3,10 @@ import { getLatestImportedArticles } from "@/lib/articles/legacy-source"; export const revalidate = 300; -const MAX_LIMIT = 200; +// Homepage feed now renders every imported post; pagination + infinite- +// scroll happen client-side over the full set. Keep an absolute ceiling +// only as a safety valve, not a UX cap. +const MAX_LIMIT = 10000; const DEFAULT_LIMIT = 100; export async function GET(request: Request) { diff --git a/src/app/home-page/components/ArticleFeed.tsx b/src/app/home-page/components/ArticleFeed.tsx index 76f1fb6..b561736 100644 --- a/src/app/home-page/components/ArticleFeed.tsx +++ b/src/app/home-page/components/ArticleFeed.tsx @@ -26,7 +26,7 @@ interface ArticleItem { -const ALL_CATEGORIES = ["All", "BROADCAST", "FEATURED", "POST PRODUCTION", "ANIMATION"]; +const ALL_CATEGORIES = ["All", "BROADCAST", "POST PRODUCTION", "ANIMATION"]; const SOURCE_FILTERS = ["All", "Live", "Imported"] as const; type SourceFilter = typeof SOURCE_FILTERS[number]; type FeedMode = "pagination" | "infinite"; @@ -94,7 +94,7 @@ export default function ArticleFeed() { let cancelled = false; (async () => { try { - const res = await fetch("/api/public/posts?limit=200", { cache: "no-store" }); + const res = await fetch("/api/public/posts?limit=5000", { cache: "no-store" }); if (!res.ok) throw new Error(`HTTP ${res.status}`); const json = await res.json(); const items = Array.isArray(json?.items) ? (json.items as ArticleItem[]) : []; @@ -613,11 +613,19 @@ export default function ArticleFeed() { {article?.excerpt}