mirror of
https://github.com/supermemoryai/supermemory.git
synced 2026-10-09 03:18:04 +00:00
fix: no longer pass down spaces
This commit is contained in:
parent
30a4ddc054
commit
6e3b3384af
1 changed files with 21 additions and 21 deletions
|
|
@ -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={{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue