feat: update App routing and MeSidebar component
Add project routes to App, update MeSidebar with navigation links to invitations and settings.
This commit is contained in:
parent
31e9bb68ac
commit
3a1a7b97db
@ -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 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 ChangePasswordPage = lazy(() => import("@/app/auth/change-password").then(m => ({ default: m.ChangePasswordPage })));
|
||||||
const MePage = lazy(() => import("@/app/me").then(m => ({ default: m.MePage })));
|
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 ChatPage = lazy(() => import("@/app/chat").then(m => ({ default: m.ChatPage })));
|
||||||
const ExplorePage = lazy(() => import("@/app/explore/ExplorePage").then(m => ({ default: m.ExplorePage })));
|
const ExplorePage = lazy(() => import("@/app/explore/ExplorePage").then(m => ({ default: m.ExplorePage })));
|
||||||
const MyAccountPage = lazy(() => import("@/app/settings").then(m => ({ default: m.MyAccountPage })));
|
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 IssueDetailPage = lazy(() => import("@/app/project").then(m => ({ default: m.IssueDetailPage })));
|
||||||
const SkillDetailPage = lazy(() => import("@/app/project").then(m => ({ default: m.SkillDetailPage })));
|
const SkillDetailPage = lazy(() => import("@/app/project").then(m => ({ default: m.SkillDetailPage })));
|
||||||
const PullRequestDetailPage = lazy(() => import("@/app/project").then(m => ({ default: m.PullRequestDetailPage })));
|
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 GeneralSettings = lazy(() => import("@/app/project").then(m => ({ default: m.GeneralSettings })));
|
||||||
const MembersSettings = lazy(() => import("@/app/project").then(m => ({ default: m.MembersSettings })));
|
const MembersSettings = lazy(() => import("@/app/project").then(m => ({ default: m.MembersSettings })));
|
||||||
const AccessSettings = lazy(() => import("@/app/project").then(m => ({ default: m.AccessSettings })));
|
const AccessSettings = lazy(() => import("@/app/project").then(m => ({ default: m.AccessSettings })));
|
||||||
@ -96,6 +99,7 @@ export default function App() {
|
|||||||
<Route path="/me/followers" element={<MePage />} />
|
<Route path="/me/followers" element={<MePage />} />
|
||||||
<Route path="/me/following" element={<MePage />} />
|
<Route path="/me/following" element={<MePage />} />
|
||||||
<Route path="/me/notify" element={<MePage />} />
|
<Route path="/me/notify" element={<MePage />} />
|
||||||
|
<Route path="/me/invitations" element={<MyInvitationsPage />} />
|
||||||
<Route path="/me/chat" element={<ChatPage scope="personal" />} />
|
<Route path="/me/chat" element={<ChatPage scope="personal" />} />
|
||||||
<Route path="/me/chat/:conversationId" element={<ChatPage scope="personal" />} />
|
<Route path="/me/chat/:conversationId" element={<ChatPage scope="personal" />} />
|
||||||
<Route path="/explore" element={<ExplorePage />} />
|
<Route path="/explore" element={<ExplorePage />} />
|
||||||
@ -117,6 +121,9 @@ export default function App() {
|
|||||||
{/* Channel-based routes if any */}
|
{/* Channel-based routes if any */}
|
||||||
</Route>
|
</Route>
|
||||||
|
|
||||||
|
<Route path="/projects/:projectName/invitations" element={<ProjectInvitationPage />} />
|
||||||
|
<Route path="/:projectName/join" element={<ProjectJoinPage />} />
|
||||||
|
|
||||||
<Route path="/:projectName" element={<ProjectLayout />}>
|
<Route path="/:projectName" element={<ProjectLayout />}>
|
||||||
<Route index element={<Navigate to="repos" replace />} />
|
<Route index element={<Navigate to="repos" replace />} />
|
||||||
<Route path="repos" element={<ReposPage />} />
|
<Route path="repos" element={<ReposPage />} />
|
||||||
@ -164,4 +171,4 @@ export default function App() {
|
|||||||
</Suspense>
|
</Suspense>
|
||||||
</BrowserRouter>
|
</BrowserRouter>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,6 +8,7 @@ import {
|
|||||||
Users,
|
Users,
|
||||||
MessageSquare,
|
MessageSquare,
|
||||||
Bell,
|
Bell,
|
||||||
|
Mail,
|
||||||
PanelLeftClose
|
PanelLeftClose
|
||||||
} from "lucide-react";
|
} from "lucide-react";
|
||||||
import type { ComponentType } from "react";
|
import type { ComponentType } from "react";
|
||||||
@ -53,6 +54,11 @@ const ME_NAV_ITEMS: NavItem[] = [
|
|||||||
name: "Notifications",
|
name: "Notifications",
|
||||||
icon: Bell,
|
icon: Bell,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: "/me/invitations",
|
||||||
|
name: "Invitations",
|
||||||
|
icon: Mail,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: "/me/stars",
|
path: "/me/stars",
|
||||||
name: "Stars",
|
name: "Stars",
|
||||||
@ -206,4 +212,4 @@ export function MeSidebar({ onCollapse }: MeSidebarProps) {
|
|||||||
</nav>
|
</nav>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user