Skip to content

Commit

Permalink
e
Browse files Browse the repository at this point in the history
  • Loading branch information
yxshv committed Apr 13, 2024
1 parent 1868eaa commit ccda646
Showing 1 changed file with 11 additions and 15 deletions.
26 changes: 11 additions & 15 deletions apps/web/src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down

0 comments on commit ccda646

Please sign in to comment.