11import { observer } from "mobx-react" ;
22import { useParams } from "next/navigation" ;
3- // hooks
3+ // plane imports
44import { Header , Row } from "@plane/ui" ;
5+ // components
56import { AppHeader } from "@/components/core/app-header" ;
67import { TabNavigationRoot } from "@/components/navigation" ;
78import { useIssueDetail } from "@/hooks/store/use-issue-detail" ;
9+ import { useProjectNavigationPreferences } from "@/hooks/use-navigation-preferences" ;
810// local components
911import { WorkItemDetailsHeader } from "./work-item-header" ;
1012
@@ -18,25 +20,29 @@ export const ProjectWorkItemDetailsHeader = observer(function ProjectWorkItemDet
1820 // derived values
1921 const issueId = getIssueIdByIdentifier ( workItem ?. toString ( ) ) ;
2022 const issueDetails = issueId ? getIssueById ( issueId ?. toString ( ) ) : undefined ;
23+ // preferences
24+ const { preferences : projectPreferences } = useProjectNavigationPreferences ( ) ;
2125
2226 return (
2327 < >
24- < div className = "z-20" >
25- < Row className = "h-header flex gap-2 w-full items-center border-b border-custom-border-200 bg-custom-sidebar-background-100" >
26- < div className = "flex items-center gap-2 divide-x divide-custom-border-100 h-full w-full" >
27- < div className = "flex items-center h-full w-full flex-1" >
28- < Header className = "h-full" >
29- < Header . LeftItem className = "h-full max-w-full" >
30- < TabNavigationRoot
31- workspaceSlug = { workspaceSlug }
32- projectId = { issueDetails ?. project_id ?. toString ( ) ?? "" }
33- />
34- </ Header . LeftItem >
35- </ Header >
28+ { projectPreferences . navigationMode === "horizontal" && (
29+ < div className = "z-20" >
30+ < Row className = "h-header flex gap-2 w-full items-center border-b border-custom-border-200 bg-custom-sidebar-background-100" >
31+ < div className = "flex items-center gap-2 divide-x divide-custom-border-100 h-full w-full" >
32+ < div className = "flex items-center h-full w-full flex-1" >
33+ < Header className = "h-full" >
34+ < Header . LeftItem className = "h-full max-w-full" >
35+ < TabNavigationRoot
36+ workspaceSlug = { workspaceSlug }
37+ projectId = { issueDetails ?. project_id ?. toString ( ) ?? "" }
38+ />
39+ </ Header . LeftItem >
40+ </ Header >
41+ </ div >
3642 </ div >
37- </ div >
38- </ Row >
39- </ div >
43+ </ Row >
44+ </ div >
45+ ) }
4046 < AppHeader header = { < WorkItemDetailsHeader /> } />
4147 </ >
4248 ) ;
0 commit comments