diff options
| author | yxshv <[email protected]> | 2024-04-13 23:54:22 +0530 |
|---|---|---|
| committer | yxshv <[email protected]> | 2024-04-13 23:54:22 +0530 |
| commit | ba47246430be998ba590436852c9744a0da63b65 (patch) | |
| tree | 15a6c382f63f9f2caae6e89c4c350fec3c551400 /apps/web/src/components | |
| parent | generate (diff) | |
| download | supermemory-ba47246430be998ba590436852c9744a0da63b65.tar.xz supermemory-ba47246430be998ba590436852c9744a0da63b65.zip | |
fix notes
Diffstat (limited to 'apps/web/src/components')
| -rw-r--r-- | apps/web/src/components/Sidebar/AddMemoryDialog.tsx | 6 | ||||
| -rw-r--r-- | apps/web/src/components/Sidebar/FilterCombobox.tsx | 3 | ||||
| -rw-r--r-- | apps/web/src/components/Sidebar/MemoriesBar.tsx | 6 |
3 files changed, 7 insertions, 8 deletions
diff --git a/apps/web/src/components/Sidebar/AddMemoryDialog.tsx b/apps/web/src/components/Sidebar/AddMemoryDialog.tsx index 93f4f3a7..90ac46fa 100644 --- a/apps/web/src/components/Sidebar/AddMemoryDialog.tsx +++ b/apps/web/src/components/Sidebar/AddMemoryDialog.tsx @@ -313,15 +313,15 @@ export function SpaceAddPage({ closeDialog }: { closeDialog: () => void }) { ); } -export function MemorySelectedItem({ id, title, url, image, onRemove }: StoredContent & { onRemove: () => void; }) { +export function MemorySelectedItem({ id, title, url, type, image, onRemove }: StoredContent & { onRemove: () => void; }) { return ( <div className="flex justify-start gap-2 p-1 px-2 w-full items-center text-sm rounded-md hover:bg-rgray-4 focus-within-bg-rgray-4 [&:hover>[data-icon]]:block [&:hover>img]:hidden"> - <img src={image ?? "/icons/logo_without_bg.png"} className="h-5 w-5" /> + <img src={type === 'note'? '/note.svg' : image ?? "/icons/logo_without_bg.png"} className="h-5 w-5" /> <button onClick={onRemove} data-icon className="w-5 h-5 p-0 m-0 hidden focus-visible:outline-none"> <X className="w-5 h-5 scale-90" /> </button> <span>{title}</span> - <span className="ml-auto block opacity-50">{cleanUrl(url)}</span> + <span className="ml-auto block opacity-50">{type ==='note' ? 'Note' : cleanUrl(url)}</span> </div> ) } diff --git a/apps/web/src/components/Sidebar/FilterCombobox.tsx b/apps/web/src/components/Sidebar/FilterCombobox.tsx index 30463672..88bb5a8c 100644 --- a/apps/web/src/components/Sidebar/FilterCombobox.tsx +++ b/apps/web/src/components/Sidebar/FilterCombobox.tsx @@ -180,7 +180,6 @@ export function FilterMemories({ const [isSearching, setIsSearching] = React.useState(false) const results = React.useMemo(() => { - console.log("use memo") return searchResults.map(r => r.memory) }, [searchResults]) @@ -258,7 +257,7 @@ export function FilterMemories({ <div className="text-rgray-11" > - <img src={m.image ?? "/icons/logo_without_bg.png"} className="mr-2 h-4 w-4" /> + <img src={m.type === 'note' ? '/note.svg' : m.image ?? "/icons/logo_without_bg.png"} className="mr-2 h-4 w-4" /> {m.title} <Check data-state-on={selected.find(i => i.id === m.id) !== undefined} diff --git a/apps/web/src/components/Sidebar/MemoriesBar.tsx b/apps/web/src/components/Sidebar/MemoriesBar.tsx index aaf40fd9..1c061451 100644 --- a/apps/web/src/components/Sidebar/MemoriesBar.tsx +++ b/apps/web/src/components/Sidebar/MemoriesBar.tsx @@ -354,19 +354,19 @@ export function SpaceItem({ <MemoryWithImages3 className="h-24 w-24" id={id.toString()} - images={spaceMemories.map((c) => c.image).reverse() as string[]} + images={spaceMemories.map((c) => c.type === 'note' ? '/note.svg' : c.image).reverse() as string[]} /> ) : spaceMemories.length > 1 ? ( <MemoryWithImages2 className="h-24 w-24" id={id.toString()} - images={spaceMemories.map((c) => c.image).reverse() as string[]} + images={spaceMemories.map((c) => c.type === 'note' ? '/note.svg' : c.image).reverse() as string[]} /> ) : spaceMemories.length === 1 ? ( <MemoryWithImage className="h-24 w-24" id={id.toString()} - image={spaceMemories[0].image!} + image={spaceMemories[0].type === 'note' ? '/note.svg' : spaceMemories[0].image!} /> ) : ( <div className="bg-rgray-4 opacity-30 rounded-full w-24 h-24 scale-50 shadow-"> |