diff options
| author | Dhravya <[email protected]> | 2024-04-11 19:00:34 -0700 |
|---|---|---|
| committer | Dhravya <[email protected]> | 2024-04-11 19:00:34 -0700 |
| commit | 09289dc4680d2b24fcf7e1234e0235b718712291 (patch) | |
| tree | 41f317a90f63074dc373a855145b29d249d9d205 /apps/web/src/components | |
| parent | add search to context (diff) | |
| download | supermemory-09289dc4680d2b24fcf7e1234e0235b718712291.tar.xz supermemory-09289dc4680d2b24fcf7e1234e0235b718712291.zip | |
minor edits to make stuff work
Diffstat (limited to 'apps/web/src/components')
| -rw-r--r-- | apps/web/src/components/Main.tsx | 13 | ||||
| -rw-r--r-- | apps/web/src/components/Sidebar/FilterCombobox.tsx | 8 | ||||
| -rw-r--r-- | apps/web/src/components/Sidebar/MemoriesBar.tsx | 6 |
3 files changed, 16 insertions, 11 deletions
diff --git a/apps/web/src/components/Main.tsx b/apps/web/src/components/Main.tsx index c7bb3f1e..f3c45f2a 100644 --- a/apps/web/src/components/Main.tsx +++ b/apps/web/src/components/Main.tsx @@ -185,9 +185,14 @@ export default function Main({ sidebarOpen }: { sidebarOpen: boolean }) { }, ); - const sourcesInJson = (await sourcesResponse.json()) as { - ids: string[]; - }; + console.log(await sourcesResponse.json()); + + // const sourcesInJson = (await sourcesResponse.json()) as { + // ids: string[]; + // }; + + // console.log(sourcesInJson) + const sourcesInJson = { ids: [] }; setIsAiLoading(false); setChatHistory((prev) => { @@ -205,7 +210,7 @@ export default function Main({ sidebarOpen }: { sidebarOpen: boolean }) { }); const actualSelectedSpaces = selectedSpaces.map( - (space) => spaces.find((s) => s.id === space)?.title ?? "", + (space) => spaces.find((s) => s.id === space)?.name ?? "", ); const response = await fetch( diff --git a/apps/web/src/components/Sidebar/FilterCombobox.tsx b/apps/web/src/components/Sidebar/FilterCombobox.tsx index 0a93ee55..bd432215 100644 --- a/apps/web/src/components/Sidebar/FilterCombobox.tsx +++ b/apps/web/src/components/Sidebar/FilterCombobox.tsx @@ -95,7 +95,7 @@ export function FilterSpaces({ filter={(val, search) => spaces .find((s) => s.id.toString() === val) - ?.title.toLowerCase() + ?.name.toLowerCase() .includes(search.toLowerCase().trim()) ? 1 : 0 @@ -128,7 +128,7 @@ export function FilterSpaces({ className="text-rgray-11" > <SpaceIcon className="mr-2 h-4 w-4" /> - {space.title} + {space.name} {selectedSpaces.includes(space.id)} <Check data-state-on={selectedSpaces.includes(space.id)} @@ -212,7 +212,7 @@ export function FilterMemories({ filter={(val, search) => spaces .find((s) => s.id.toString() === val) - ?.title.toLowerCase() + ?.name.toLowerCase() .includes(search.toLowerCase().trim()) ? 1 : 0 @@ -245,7 +245,7 @@ export function FilterMemories({ className="text-rgray-11" > <SpaceIcon className="mr-2 h-4 w-4" /> - {space.title} + {space.name} {selectedSpaces.includes(space.id)} <Check data-state-on={selectedSpaces.includes(space.id)} diff --git a/apps/web/src/components/Sidebar/MemoriesBar.tsx b/apps/web/src/components/Sidebar/MemoriesBar.tsx index 133e9957..769e6296 100644 --- a/apps/web/src/components/Sidebar/MemoriesBar.tsx +++ b/apps/web/src/components/Sidebar/MemoriesBar.tsx @@ -150,7 +150,7 @@ export function SpaceItem({ id, onDelete, onClick, -}: StoredSpace & { onDelete: () => void, onClick?: () => void }) { +}: StoredSpace & { onDelete: () => void; onClick?: () => void }) { const [itemRef, animateItem] = useAnimate(); const { width } = useViewport(); @@ -255,7 +255,7 @@ export function SpaceItem({ }; }} /> - {content.length > 2 ? ( + {/* {content.length > 2 ? ( <MemoryWithImages3 className="h-24 w-24" id={id.toString()} @@ -273,7 +273,7 @@ export function SpaceItem({ id={id.toString()} images={content.map((c) => c.image).reverse() as string[]} /> - )} + )} */} </motion.div> ); } |