diff options
| author | yxshv <[email protected]> | 2024-04-13 12:57:00 +0530 |
|---|---|---|
| committer | yxshv <[email protected]> | 2024-04-13 12:57:00 +0530 |
| commit | ccda64670cbdf9715009c0aacfe237c412255119 (patch) | |
| tree | 4d62080ecd7ed88cdc5fe8f60c0ae98e048f9580 /apps/web/src | |
| parent | merge (diff) | |
| download | supermemory-ccda64670cbdf9715009c0aacfe237c412255119.tar.xz supermemory-ccda64670cbdf9715009c0aacfe237c412255119.zip | |
e
Diffstat (limited to 'apps/web/src')
| -rw-r--r-- | apps/web/src/app/page.tsx | 26 |
1 files 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 ( <MemoryProvider user={userData} |