import './App.css'
import { Navigate, createBrowserRouter, useParams } from "react-router";
import { RouterProvider } from "react-router/dom";
import AuthLayout from "@/page/auth/layout";
import LoginPage from "@/page/auth/login";
import RegisterPage from "@/page/auth/register";
import ForgotPasswordPage from "@/page/auth/forgot-password";
import ResetPasswordPage from "@/page/auth/reset-password";
import { PersonalShell, WorkspaceShell, SettingsShell } from "@/components/shell/navshell";
import WorkspaceRepositoriesPage from "@/page/workspace/repositories";
import WorkspaceIssuesPage from "@/page/workspace/issues";
import IssueDetailPage from "@/page/workspace/issues/detail";
import RepoLayout from "@/page/workspace/repo/layout";
import CodeTab from "@/page/workspace/repo/code";
import CommitsTab from "@/page/workspace/repo/commits";
import BranchesTab from "@/page/workspace/repo/branches";
import TagsTab from "@/page/workspace/repo/tags";
import PullsTab from "@/page/workspace/repo/pulls";
import ContributorsTab from "@/page/workspace/repo/contributors";
import WebhooksTab from "@/page/workspace/repo/webhooks";
import RepoSettingsTab from "@/page/workspace/repo/settings";
import ReadmePage from "@/page/workspace/repo/readme-page";
import CommitDetailPage from "@/page/workspace/repo/commit-detail";
import PullCreatePage from "@/page/workspace/repo/pull-create";
import PullDetailPage from "@/page/workspace/repo/pull-detail";
import WorkspaceSettingsPage from "@/page/workspace/settings";
import ChannelPage from "@/page/workspace/channel";
import WorkplanChatList from "@/page/workspace/workplan/chat-list";
import WorkplanChatConversation from "@/page/workspace/workplan/chat-conversation";
import MeOverviewPage from "@/page/me/overview";
import MeReposPage from "@/page/me/repos";
import MeChatListPage from "@/page/me/chat-list.tsx";
import MeChatConversationPage from "@/page/me/chat-conversation.tsx";
import MeNotificationsPage from "@/page/me/notifications";
import MeStarsPage from "@/page/me/stars";
import MeFollowingPage from "@/page/me/following";
import SettingsProfilePage from "@/page/settings/profile";
import SettingsAppearancePage from "@/page/settings/appearance";
import SettingsNotificationsPage from "@/page/settings/notifications";
import SettingsPrivacyPage from "@/page/settings/privacy";
import SettingsAccessibilityPage from "@/page/settings/accessibility";
import SettingsSecurityPage from "@/page/settings/security";
import SettingsTokensPage from "@/page/settings/tokens";
import SettingsSshKeysPage from "@/page/settings/ssh-keys";
function WorkspaceCompatRedirect() {
const { projectName = "" } = useParams();
return ;
}
function App() {
const router = createBrowserRouter([
{
path: "/",
element: ,
},
{
path: "/workspace/:projectName/*",
element: ,
},
{
path: "/:projectName",
element: ,
children: [
{
index: true,
element: ,
},
{
path: "repos",
element: ,
},
{
path: "repo/:repoName",
element: ,
children: [
{ index: true, element: },
{ path: "code", element: },
{ path: "readme", element: },
{ path: "commits", element: },
{ path: "branches", element: },
{ path: "tags", element: },
{ path: "pulls", element: },
{ path: "contributors", element: },
{ path: "webhooks", element: },
{ path: "settings", element: },
{ path: "commits/:oid", element: },
{ path: "pulls/new", element: },
{ path: "pulls/:number", element: },
],
},
{
path: "issues",
element: ,
},
{
path: "issues/:issueNumber",
element: ,
},
{
path: "chat",
element: ,
},
{
path: "chat/:channel",
element: ,
},
{
path: "workplan",
element: ,
},
{
path: "workplan/chat",
element: ,
},
{
path: "workplan/chat/:conversationId",
element: ,
},
{
path: "channel",
element: ,
},
{
path: "channel/:roomId",
element: ,
},
{
path: "settings",
element: ,
},
],
},
{
path: "/me",
element: ,
children: [
{
index: true,
element: ,
},
{
path: "repos",
element: ,
},
{
path: "chat",
element: ,
},
{
path: "chat/:conversationId",
element: ,
},
{
path: "notifications",
element: ,
},
{
path: "stars",
element: ,
},
{
path: "following",
element: ,
},
],
},
{
path: "/settings",
element: ,
children: [
{
index: true,
element: ,
},
{
path: "profile",
element: ,
},
{
path: "appearance",
element: ,
},
{
path: "notifications",
element: ,
},
{
path: "privacy",
element: ,
},
{
path: "accessibility",
element: ,
},
{
path: "security",
element: ,
},
{
path: "tokens",
element: ,
},
{
path: "ssh-keys",
element: ,
},
],
},
{
path: "/auth",
element: ,
children: [
{
index: true,
element: ,
},
{
path: "login",
element: ,
},
{
path: "register",
element: ,
},
{
path: "forgot-password",
element: ,
},
{
path: "reset-password",
element: ,
},
],
},
]);
return (
)
}
export default App