From 1318f7592760253d82da0aaa0efcf9972676c3a4 Mon Sep 17 00:00:00 2001 From: Asher Gomez Date: Fri, 5 May 2023 08:46:50 +1000 Subject: [PATCH] fix: limit feed to 10 items --- routes/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routes/index.tsx b/routes/index.tsx index 08a423089..fd324b7ad 100644 --- a/routes/index.tsx +++ b/routes/index.tsx @@ -21,7 +21,7 @@ interface HomePageData extends State { export const handler: Handlers = { async GET(_req, ctx) { - const items = await getAllItems(); + const items = (await getAllItems()).slice(0, 10); const users = await getUsersByIds(items.map((item) => item.userId)); const commentsCounts = await Promise.all( items.map((item) => getItemCommentsCount(item.id)),