From 3a1a7b97db55c9b41630e782f5ed7324bddd6740 Mon Sep 17 00:00:00 2001 From: ZhenYi <434836402@qq.com> Date: Thu, 14 May 2026 23:15:54 +0800 Subject: [PATCH] feat: update App routing and MeSidebar component Add project routes to App, update MeSidebar with navigation links to invitations and settings. --- src/App.tsx | 9 ++++++++- src/app/me/components/MeSidebar.tsx | 8 +++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index a3923e8..d7716db 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -22,6 +22,7 @@ const TwoFactorPage = lazy(() => import("@/app/auth/two-factor").then(m => ({ de const VerifyEmailPage = lazy(() => import("@/app/auth/verify-email").then(m => ({ default: m.VerifyEmailPage }))); const ChangePasswordPage = lazy(() => import("@/app/auth/change-password").then(m => ({ default: m.ChangePasswordPage }))); const MePage = lazy(() => import("@/app/me").then(m => ({ default: m.MePage }))); +const MyInvitationsPage = lazy(() => import("@/app/me/MyInvitationsPage")); const ChatPage = lazy(() => import("@/app/chat").then(m => ({ default: m.ChatPage }))); const ExplorePage = lazy(() => import("@/app/explore/ExplorePage").then(m => ({ default: m.ExplorePage }))); const MyAccountPage = lazy(() => import("@/app/settings").then(m => ({ default: m.MyAccountPage }))); @@ -44,6 +45,8 @@ const CommitDetailPage = lazy(() => import("@/app/project").then(m => ({ default const IssueDetailPage = lazy(() => import("@/app/project").then(m => ({ default: m.IssueDetailPage }))); const SkillDetailPage = lazy(() => import("@/app/project").then(m => ({ default: m.SkillDetailPage }))); const PullRequestDetailPage = lazy(() => import("@/app/project").then(m => ({ default: m.PullRequestDetailPage }))); +const ProjectJoinPage = lazy(() => import("@/app/project").then(m => ({ default: m.ProjectJoinPage }))); +const ProjectInvitationPage = lazy(() => import("@/app/project").then(m => ({ default: m.ProjectInvitationPage }))); const GeneralSettings = lazy(() => import("@/app/project").then(m => ({ default: m.GeneralSettings }))); const MembersSettings = lazy(() => import("@/app/project").then(m => ({ default: m.MembersSettings }))); const AccessSettings = lazy(() => import("@/app/project").then(m => ({ default: m.AccessSettings }))); @@ -96,6 +99,7 @@ export default function App() { } /> } /> } /> + } /> } /> } /> } /> @@ -117,6 +121,9 @@ export default function App() { {/* Channel-based routes if any */} + } /> + } /> + }> } /> } /> @@ -164,4 +171,4 @@ export default function App() { ); -} \ No newline at end of file +} diff --git a/src/app/me/components/MeSidebar.tsx b/src/app/me/components/MeSidebar.tsx index cccfff5..a574e64 100644 --- a/src/app/me/components/MeSidebar.tsx +++ b/src/app/me/components/MeSidebar.tsx @@ -8,6 +8,7 @@ import { Users, MessageSquare, Bell, + Mail, PanelLeftClose } from "lucide-react"; import type { ComponentType } from "react"; @@ -53,6 +54,11 @@ const ME_NAV_ITEMS: NavItem[] = [ name: "Notifications", icon: Bell, }, + { + path: "/me/invitations", + name: "Invitations", + icon: Mail, + }, { path: "/me/stars", name: "Stars", @@ -206,4 +212,4 @@ export function MeSidebar({ onCollapse }: MeSidebarProps) { ); -} \ No newline at end of file +}