Skip to content

Commit c9f51cf

Browse files
committed
.
1 parent d4f4aab commit c9f51cf

File tree

1 file changed

+19
-15
lines changed

1 file changed

+19
-15
lines changed

components/app-sidebar.tsx

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -45,28 +45,32 @@ function usePageSidebar() {
4545

4646

4747
function PageSidebarProvider() {
48-
const content = [{ text: "dw", id: "dwd"}]
48+
const content = null
4949
const contextValue = React.useMemo<NavigatorContextProps>(
5050
() => ({
5151
content
5252
}),
5353
[content]
5454
)
55-
return (
56-
<NavigatorContext.Provider value={contextValue}>
57-
{/* <SidebarMenu className="mb-12 px-8 text-xs overflow-y-scroll no-scrollbar">
58-
<span className="font-bold p-2 select-none text-foreground/50">
59-
This Page
60-
</span>
61-
{content.map((item) => (
62-
<Link key={item.text} href={"#" + item.id} className="p-2 rounded-sm hover:bg-o-blue/3 select-none">
63-
{item.text}
64-
</Link>
65-
))}
55+
if (content != null) {
56+
return (
57+
<NavigatorContext.Provider value={contextValue}>
58+
<SidebarMenu className="mb-12 px-8 text-xs overflow-y-scroll no-scrollbar">
59+
<span className="font-bold p-2 select-none text-foreground/50">
60+
This Page
61+
</span>
62+
{content.map((item) => (
63+
<Link key={item.text} href={"#" + item.id} className="p-2 rounded-sm hover:bg-o-blue/3 select-none">
64+
{item.text}
65+
</Link>
66+
))}
6667

67-
</SidebarMenu> */}
68-
</NavigatorContext.Provider>
69-
)
68+
</SidebarMenu>
69+
</NavigatorContext.Provider>
70+
)
71+
} else {
72+
return (<NavigatorContext.Provider value={contextValue}></NavigatorContext.Provider>)
73+
}
7074
}
7175

7276

0 commit comments

Comments
 (0)