补充
Change-Id: I058b37511bf75593587009fabaebaa7b11ad7aed
diff --git a/Merge/front/src/components/Sidebar.jsx b/Merge/front/src/components/Sidebar.jsx
index e35db63..b0453e4 100644
--- a/Merge/front/src/components/Sidebar.jsx
+++ b/Merge/front/src/components/Sidebar.jsx
@@ -1,32 +1,15 @@
-import React, { useState, useEffect } from 'react'
+import React, { useState } from 'react'
import { NavLink, useLocation, useNavigate } from 'react-router-dom'
import {
Home,
BookOpen,
- BarChart3,
- Activity,
- Users,
ChevronDown,
- Search,
- Upload,
} from 'lucide-react'
import '../App.css'
const menuItems = [
{ id: 'home', label: '首页', icon: Home, path: '/home' },
{ id: 'notebooks', label: '笔记管理', icon: BookOpen, path: '/notebooks' },
- {
- id: 'dashboard',
- label: '数据看板',
- icon: BarChart3,
- path: '/dashboard',
- submenu: [
- { id: 'overview', label: '账号概况', path: '/dashboard/overview' },
- { id: 'content', label: '内容分析', path: '/dashboard/content' },
- { id: 'fans', label: '粉丝数据', path: '/dashboard/fans' },
- ]
- },
- { id: 'upload-jwlll', label: '智能发布', icon: Upload, path: '/upload-jwlll' },
// { id: 'activity', label: '活动中心', icon: Activity, path: '/activity' },
// { id: 'notes', label: '笔记灵感', icon: BookOpen, path: '/notes' },
// { id: 'creator', label: '创作学院', icon: Users, path: '/creator' },
@@ -38,13 +21,6 @@
const location = useLocation()
const navigate = useNavigate()
- // 打开 dashboard 下拉时保持展开
- useEffect(() => {
- if (location.pathname.startsWith('/dashboard')) {
- setExpandedMenu('dashboard')
- }
- }, [location.pathname])
-
const toggleMenu = item => {
if (item.submenu) {
setExpandedMenu(expandedMenu === item.id ? null : item.id)