refactor: split and cleanup theme/DocPage (#7006)

This commit is contained in:
Sébastien Lorber 2022-03-25 19:58:28 +01:00 committed by GitHub
parent 2964e6f65d
commit 1b974e8b1b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 299 additions and 163 deletions

View file

@ -307,7 +307,7 @@ describe('useSidebarBreadcrumbs', () => {
},
},
}}>
<DocsSidebarProvider sidebar={sidebar}>
<DocsSidebarProvider name="sidebarName" items={sidebar}>
{children}
</DocsSidebarProvider>
</Context.Provider>
@ -430,7 +430,7 @@ describe('useCurrentSidebarCategory', () => {
(sidebar?: PropSidebar) => (location: string) =>
renderHook(() => useCurrentSidebarCategory(), {
wrapper: ({children}) => (
<DocsSidebarProvider sidebar={sidebar}>
<DocsSidebarProvider name="sidebarName" items={sidebar}>
<StaticRouter location={location}>{children}</StaticRouter>
</DocsSidebarProvider>
),