diff options
| author | Yash <[email protected]> | 2024-04-05 08:33:09 +0000 |
|---|---|---|
| committer | Yash <[email protected]> | 2024-04-05 08:33:09 +0000 |
| commit | 4faf6bd82a2f93f3b78bad6250ef44ef8b372ba0 (patch) | |
| tree | 97c5fde685e786ad180194dd5be73b30a28705dc /apps/web/src/components | |
| parent | Merge branch 'new-ui' of https://github.com/Dhravya/supermemory into new-ui (diff) | |
| download | supermemory-4faf6bd82a2f93f3b78bad6250ef44ef8b372ba0.tar.xz supermemory-4faf6bd82a2f93f3b78bad6250ef44ef8b372ba0.zip | |
add context and fix sidebar
Diffstat (limited to 'apps/web/src/components')
| -rw-r--r-- | apps/web/src/components/Sidebar/index.tsx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/apps/web/src/components/Sidebar/index.tsx b/apps/web/src/components/Sidebar/index.tsx index c4328b5d..b7230291 100644 --- a/apps/web/src/components/Sidebar/index.tsx +++ b/apps/web/src/components/Sidebar/index.tsx @@ -7,6 +7,7 @@ import { MemoriesBar } from "./MemoriesBar"; import { AnimatePresence, motion } from "framer-motion"; import { Bin } from "@/assets/Bin"; import { CollectedSpaces } from "../../../types/memory"; +import { useMemory } from "@/contexts/MemoryContext"; export type MenuItem = { icon: React.ReactNode | React.ReactNode[]; @@ -27,11 +28,11 @@ const menuItemsBottom: Array<MenuItem> = [ export default function Sidebar({ selectChange, - spaces, }: { - selectChange?: (selectedItem: string | null) => Promise<void>; - spaces: CollectedSpaces[]; + selectChange?: (selectedItem: string | null) => void; }) { + const { spaces } = useMemory(); + const menuItemsTop: Array<MenuItem> = [ { icon: <MemoryIcon className="h-10 w-10" />, |