mirror of
https://github.com/supermemoryai/supermemory.git
synced 2026-05-12 14:10:55 +00:00
e
This commit is contained in:
parent
1868eaa9a3
commit
ccda64670c
1 changed files with 11 additions and 15 deletions
|
|
@ -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}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue