From ccda64670cbdf9715009c0aacfe237c412255119 Mon Sep 17 00:00:00 2001 From: yxshv Date: Sat, 13 Apr 2024 12:57:00 +0530 Subject: [PATCH] e --- apps/web/src/app/page.tsx | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/apps/web/src/app/page.tsx b/apps/web/src/app/page.tsx index 1cbe6217..918b056e 100644 --- a/apps/web/src/app/page.tsx +++ b/apps/web/src/app/page.tsx @@ -64,32 +64,28 @@ export default async function Home() { // Fetch only first 3 content of each spaces let contents: (typeof storedContent.$inferSelect)[] = []; + //console.log(await db.select().from(storedContent).) + await Promise.all([ collectedSpaces.forEach(async (space) => { + console.log("fetching ") + const data = await fetchContentForSpace(space.id, { + offset: 0, + limit: 3, + }) + console.log(data) contents = [ ...contents, - ...(await fetchContentForSpace(space.id, { - offset: 0, - limit: 3, - })), + ...data, ]; }), ]); + console.log(contents) + // freeMemories const freeMemories = await fetchFreeMemories(userData.id); - // @dhravya test these 3 functions - fetchFreeMemories; - fetchContentForSpace; - searchMemoriesAndSpaces; - - collectedSpaces.push({ - id: 1, - name: "Cool tech", - user: null, - }); - return (