mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-30 16:37:56 +02:00
refactor: import jest as global; unify import style of some modules (#6898)
* refactor: import jest as global * fix react
This commit is contained in:
parent
e97dc0d37e
commit
c9ee6e467c
59 changed files with 177 additions and 139 deletions
|
@ -5,7 +5,7 @@
|
|||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import React, {createContext, type ReactNode, useContext} from 'react';
|
||||
import React, {type ReactNode, useContext} from 'react';
|
||||
import {
|
||||
useActivePlugin,
|
||||
useAllDocsData,
|
||||
|
@ -29,7 +29,7 @@ export const isDocsPluginEnabled: boolean = !!useAllDocsData;
|
|||
// Inspired by https://github.com/jamiebuilds/unstated-next/blob/master/src/unstated-next.tsx
|
||||
const EmptyContextValue: unique symbol = Symbol('EmptyContext');
|
||||
|
||||
const DocsVersionContext = createContext<
|
||||
const DocsVersionContext = React.createContext<
|
||||
PropVersionMetadata | typeof EmptyContextValue
|
||||
>(EmptyContextValue);
|
||||
|
||||
|
@ -69,7 +69,7 @@ export function useDocById(id: string | undefined): PropVersionDoc | undefined {
|
|||
return doc;
|
||||
}
|
||||
|
||||
const DocsSidebarContext = createContext<
|
||||
const DocsSidebarContext = React.createContext<
|
||||
PropSidebar | null | typeof EmptyContextValue
|
||||
>(EmptyContextValue);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue