aboutsummaryrefslogtreecommitdiff
path: root/apps/web/src/components
diff options
context:
space:
mode:
authorDhravya <[email protected]>2024-04-05 22:13:10 -0700
committerDhravya <[email protected]>2024-04-05 22:13:10 -0700
commit6e3b3384afb16130c1c082324c232eb722045485 (patch)
tree1030b162d0ca40028c32952c4f4151f3529c5d75 /apps/web/src/components
parentMerge branch 'new-ui' of https://github.com/Dhravya/supermemory into new-ui (diff)
downloadarchived-supermemory-6e3b3384afb16130c1c082324c232eb722045485.tar.xz
archived-supermemory-6e3b3384afb16130c1c082324c232eb722045485.zip
fix: no longer pass down spaces
Diffstat (limited to 'apps/web/src/components')
-rw-r--r--apps/web/src/components/Sidebar/index.tsx42
1 files changed, 21 insertions, 21 deletions
diff --git a/apps/web/src/components/Sidebar/index.tsx b/apps/web/src/components/Sidebar/index.tsx
index 52bab0f9..4ff6cb93 100644
--- a/apps/web/src/components/Sidebar/index.tsx
+++ b/apps/web/src/components/Sidebar/index.tsx
@@ -1,13 +1,13 @@
-"use client";
-import { StoredContent } from "@/server/db/schema";
-import { MemoryIcon } from "../../assets/Memories";
-import { Trash2, User2 } from "lucide-react";
-import React, { ElementType, useEffect, useState } from "react";
-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";
+'use client';
+import { StoredContent } from '@/server/db/schema';
+import { MemoryIcon } from '../../assets/Memories';
+import { Trash2, User2 } from 'lucide-react';
+import React, { ElementType, useEffect, useState } from 'react';
+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[];
@@ -18,17 +18,17 @@ export type MenuItem = {
const menuItemsBottom: Array<MenuItem> = [
{
icon: <Trash2 strokeWidth={1.3} className="h-6 w-6" />,
- label: "Trash",
+ label: 'Trash',
},
{
icon: <User2 strokeWidth={1.3} className="h-6 w-6" />,
- label: "Profile",
+ label: 'Profile',
},
];
export default function Sidebar({
selectChange,
- spaces
+ spaces,
}: {
selectChange?: (selectedItem: string | null) => void;
spaces: CollectedSpaces[];
@@ -39,8 +39,8 @@ export default function Sidebar({
const menuItemsTop: Array<MenuItem> = [
{
icon: <MemoryIcon className="h-10 w-10" />,
- label: "Memories",
- content: <MemoriesBar spaces={spaces} />,
+ label: 'Memories',
+ content: <MemoriesBar/>,
},
];
const menuItems = [...menuItemsTop, ...menuItemsBottom];
@@ -60,9 +60,9 @@ export default function Sidebar({
<div className="bg-rgray-2 border-r-rgray-6 relative z-[50] flex h-full w-full flex-col items-center justify-center border-r px-2 py-5 ">
<MenuItem
item={{
- label: "Memories",
+ label: 'Memories',
icon: <MemoryIcon className="h-10 w-10" />,
- content: <MemoriesBar spaces={spaces} />,
+ content: <MemoriesBar />,
}}
selectedItem={selectedItem}
setSelectedItem={setSelectedItem}
@@ -72,7 +72,7 @@ export default function Sidebar({
<MenuItem
item={{
- label: "Trash",
+ label: 'Trash',
icon: <Bin id="trash" className="z-[300] h-7 w-7" />,
}}
selectedItem={selectedItem}
@@ -81,7 +81,7 @@ export default function Sidebar({
/>
<MenuItem
item={{
- label: "Profile",
+ label: 'Profile',
icon: <User2 strokeWidth={1.3} className="h-7 w-7" />,
}}
selectedItem={selectedItem}
@@ -120,11 +120,11 @@ const MenuItem = ({
export function SubSidebar({ children }: { children?: React.ReactNode }) {
return (
<motion.div
- initial={{ opacity: 0, x: "-100%" }}
+ initial={{ opacity: 0, x: '-100%' }}
animate={{ opacity: 1, x: 0 }}
exit={{
opacity: 0,
- x: "-100%",
+ x: '-100%',
transition: { delay: 0.2 },
}}
transition={{