@@ -7,8 +7,7 @@ import { pointerOutsideOfPreview } from "@atlaskit/pragmatic-drag-and-drop/eleme
7
7
import { setCustomNativeDragPreview } from "@atlaskit/pragmatic-drag-and-drop/element/set-custom-native-drag-preview" ;
8
8
import { attachInstruction , extractInstruction } from "@atlaskit/pragmatic-drag-and-drop-hitbox/tree-item" ;
9
9
import { observer } from "mobx-react" ;
10
- import Link from "next/link" ;
11
- import { useParams } from "next/navigation" ;
10
+ import { useParams , useRouter } from "next/navigation" ;
12
11
import { createRoot } from "react-dom/client" ;
13
12
import { LinkIcon , Settings , Share2 , LogOut , MoreHorizontal , ChevronRight } from "lucide-react" ;
14
13
import { Disclosure , Transition } from "@headlessui/react" ;
@@ -78,6 +77,7 @@ export const SidebarProjectsListItem: React.FC<Props> = observer((props) => {
78
77
const dragHandleRef = useRef < HTMLButtonElement | null > ( null ) ;
79
78
// router
80
79
const { workspaceSlug, projectId : URLProjectId } = useParams ( ) ;
80
+ const router = useRouter ( ) ;
81
81
// derived values
82
82
const project = getPartialProjectById ( projectId ) ;
83
83
// toggle project list open
@@ -353,26 +353,26 @@ export const SidebarProjectsListItem: React.FC<Props> = observer((props) => {
353
353
</ span >
354
354
</ CustomMenu . MenuItem >
355
355
{ isAuthorized && (
356
- < CustomMenu . MenuItem >
357
- < Link href = { `/${ workspaceSlug } /projects/${ project ?. id } /archives/issues` } >
358
- < div className = "flex items-center justify-start gap-2" >
359
- < ArchiveIcon className = "h-3.5 w-3.5 stroke-[1.5]" />
360
- < span > { t ( "archives" ) } </ span >
361
- </ div >
362
- </ Link >
356
+ < CustomMenu . MenuItem
357
+ onClick = { ( ) => {
358
+ router . push ( `/${ workspaceSlug } /projects/${ project ?. id } /archives/issues` ) ;
359
+ } }
360
+ >
361
+ < div className = "flex items-center justify-start gap-2 cursor-pointer" >
362
+ < ArchiveIcon className = "h-3.5 w-3.5 stroke-[1.5]" />
363
+ < span > { t ( "archives" ) } </ span >
364
+ </ div >
363
365
</ CustomMenu . MenuItem >
364
366
) }
365
367
< CustomMenu . MenuItem
366
368
onClick = { ( ) => {
367
- setIsMenuActive ( false ) ;
369
+ router . push ( `/ ${ workspaceSlug } /settings/projects/ ${ project ?. id } ` ) ;
368
370
} }
369
371
>
370
- < Link href = { `/${ workspaceSlug } /settings/projects/${ project ?. id } ` } >
371
- < div className = "flex items-center justify-start gap-2" >
372
- < Settings className = "h-3.5 w-3.5 stroke-[1.5]" />
373
- < span > { t ( "settings" ) } </ span >
374
- </ div >
375
- </ Link >
372
+ < div className = "flex items-center justify-start gap-2 cursor-pointer" >
373
+ < Settings className = "h-3.5 w-3.5 stroke-[1.5]" />
374
+ < span > { t ( "settings" ) } </ span >
375
+ </ div >
376
376
</ CustomMenu . MenuItem >
377
377
{ /* leave project */ }
378
378
{ ! isAuthorized && (
0 commit comments