diff --git a/web/core/components/workspace/sidebar/projects-list-item.tsx b/web/core/components/workspace/sidebar/projects-list-item.tsx index 581054193f..d6f4365793 100644 --- a/web/core/components/workspace/sidebar/projects-list-item.tsx +++ b/web/core/components/workspace/sidebar/projects-list-item.tsx @@ -7,8 +7,7 @@ import { pointerOutsideOfPreview } from "@atlaskit/pragmatic-drag-and-drop/eleme import { setCustomNativeDragPreview } from "@atlaskit/pragmatic-drag-and-drop/element/set-custom-native-drag-preview"; import { attachInstruction, extractInstruction } from "@atlaskit/pragmatic-drag-and-drop-hitbox/tree-item"; import { observer } from "mobx-react"; -import Link from "next/link"; -import { useParams } from "next/navigation"; +import { useParams, useRouter } from "next/navigation"; import { createRoot } from "react-dom/client"; import { LinkIcon, Settings, Share2, LogOut, MoreHorizontal, ChevronRight } from "lucide-react"; import { Disclosure, Transition } from "@headlessui/react"; @@ -78,6 +77,7 @@ export const SidebarProjectsListItem: React.FC = observer((props) => { const dragHandleRef = useRef(null); // router const { workspaceSlug, projectId: URLProjectId } = useParams(); + const router = useRouter(); // derived values const project = getPartialProjectById(projectId); // toggle project list open @@ -353,26 +353,26 @@ export const SidebarProjectsListItem: React.FC = observer((props) => { {isAuthorized && ( - - -
- - {t("archives")} -
- + { + router.push(`/${workspaceSlug}/projects/${project?.id}/archives/issues`); + }} + > +
+ + {t("archives")} +
)} { - setIsMenuActive(false); + router.push(`/${workspaceSlug}/settings/projects/${project?.id}`); }} > - -
- - {t("settings")} -
- +
+ + {t("settings")} +
{/* leave project */} {!isAuthorized && (