diff options
| author | yxshv <[email protected]> | 2024-04-13 14:09:56 +0530 |
|---|---|---|
| committer | yxshv <[email protected]> | 2024-04-13 14:09:56 +0530 |
| commit | 460b3459977fcc04c68f8ef792d94a3789a6b941 (patch) | |
| tree | 8d6fc04847d915fc11afa0d21df179b8facb789f /apps/web/src/app | |
| parent | e (diff) | |
| download | archived-supermemory-460b3459977fcc04c68f8ef792d94a3789a6b941.tar.xz archived-supermemory-460b3459977fcc04c68f8ef792d94a3789a6b941.zip | |
memory item
Diffstat (limited to 'apps/web/src/app')
| -rw-r--r-- | apps/web/src/app/page.tsx | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/apps/web/src/app/page.tsx b/apps/web/src/app/page.tsx index 918b056e..7a39aafa 100644 --- a/apps/web/src/app/page.tsx +++ b/apps/web/src/app/page.tsx @@ -1,5 +1,6 @@ import { db } from "@/server/db"; import { + ChachedSpaceContent, contentToSpace, sessions, space, @@ -18,6 +19,7 @@ import { import { MemoryProvider } from "@/contexts/MemoryContext"; import Content from "./content"; import { searchMemoriesAndSpaces } from "@/actions/db"; +import { getMetaData } from "@/server/helpers"; export const runtime = "edge"; @@ -62,18 +64,20 @@ export default async function Home() { console.log(collectedSpaces) // Fetch only first 3 content of each spaces - let contents: (typeof storedContent.$inferSelect)[] = []; + let contents: ChachedSpaceContent[] = []; //console.log(await db.select().from(storedContent).) - + await Promise.all([ collectedSpaces.forEach(async (space) => { console.log("fetching ") - const data = await fetchContentForSpace(space.id, { + const data = (await fetchContentForSpace(space.id, { offset: 0, limit: 3, - }) - console.log(data) + })).map(data => ({ + ...data, + space: space.id + })) contents = [ ...contents, ...data, @@ -85,6 +89,7 @@ export default async function Home() { // freeMemories const freeMemories = await fetchFreeMemories(userData.id); + console.log('free',freeMemories) return ( <MemoryProvider |