File tree 2 files changed +6
-4
lines changed
2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -149,6 +149,8 @@ const Context = createContext<{
149
149
setOpen : ( open : boolean ) => void ;
150
150
} | null > ( null ) ;
151
151
152
+ const TocProvider = Context . Provider || Context ;
153
+
152
154
export function TocPopover ( {
153
155
open,
154
156
onOpenChange,
@@ -157,7 +159,7 @@ export function TocPopover({
157
159
} : MakeRequired < ComponentProps < typeof Collapsible > , 'open' | 'onOpenChange' > ) {
158
160
return (
159
161
< Collapsible open = { open } onOpenChange = { onOpenChange } { ...props } >
160
- < Context
162
+ < TocProvider
161
163
value = { useMemo (
162
164
( ) => ( {
163
165
open,
@@ -167,7 +169,7 @@ export function TocPopover({
167
169
) }
168
170
>
169
171
{ props . children }
170
- </ Context >
172
+ </ TocProvider >
171
173
</ Collapsible >
172
174
) ;
173
175
}
Original file line number Diff line number Diff line change @@ -359,7 +359,7 @@ export function SidebarFolderContent(props: CollapsibleContentProps) {
359
359
360
360
return (
361
361
< CollapsibleContent { ...props } className = { cn ( 'relative' , props . className ) } >
362
- < Context
362
+ < Context . Provider
363
363
value = { useMemo (
364
364
( ) => ( {
365
365
...ctx ,
@@ -370,7 +370,7 @@ export function SidebarFolderContent(props: CollapsibleContentProps) {
370
370
>
371
371
< div className = "absolute w-px inset-y-0 bg-fd-border start-3" />
372
372
{ props . children }
373
- </ Context >
373
+ </ Context . Provider >
374
374
</ CollapsibleContent >
375
375
) ;
376
376
}
You can’t perform that action at this time.
0 commit comments