11"use client"
22
33import { usePathname } from 'next/navigation'
4- import { pageNavigator } from '@/data/pagenavigator'
4+ import { NavigatorProject } from '@/data/navigator-project'
5+ import { NavigatorPage } from '@/data/navigator-page'
56
67import * as React from "react"
78import { Slot } from "@radix-ui/react-slot"
@@ -43,7 +44,8 @@ type SidebarContextProps = {
4344 setOpenMobile : ( open : boolean ) => void
4445 isMobile : boolean
4546 toggleSidebar : ( ) => void
46- content : { text : string ; id : string } [ ] | null
47+ content_projecct : { text : string ; id : string } [ ] | null
48+ content_page : { text : string ; id : string } [ ] | null
4749}
4850
4951const SidebarContext = React . createContext < SidebarContextProps | null > ( null )
@@ -118,7 +120,9 @@ function SidebarProvider({
118120 const state = open ? "expanded" : "collapsed"
119121
120122 const pathname = usePathname ( )
121- const content = pathname . toLowerCase ( ) in pageNavigator ? pageNavigator [ pathname . toLowerCase ( ) ] : null
123+ const content_projecct = pathname . toLowerCase ( ) in NavigatorProject ? NavigatorProject [ pathname . toLowerCase ( ) ] : null
124+ const content_page = pathname . toLowerCase ( ) in NavigatorPage ? NavigatorPage [ pathname . toLowerCase ( ) ] : null
125+
122126
123127 const contextValue = React . useMemo < SidebarContextProps > (
124128 ( ) => ( {
@@ -129,7 +133,8 @@ function SidebarProvider({
129133 openMobile,
130134 setOpenMobile,
131135 toggleSidebar,
132- content,
136+ content_projecct,
137+ content_page,
133138 } ) ,
134139 [ state , open , setOpen , isMobile , openMobile , setOpenMobile , toggleSidebar ]
135140 )
0 commit comments