mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-02 10:52:35 +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
|
@ -6,12 +6,11 @@
|
|||
*/
|
||||
|
||||
import React, {
|
||||
createContext,
|
||||
type ReactNode,
|
||||
useContext,
|
||||
useEffect,
|
||||
useMemo,
|
||||
useState,
|
||||
type ReactNode,
|
||||
} from 'react';
|
||||
import {useThemeConfig, type DocsVersionPersistence} from '../useThemeConfig';
|
||||
import {isDocsPluginEnabled} from '../docsUtils';
|
||||
|
@ -131,7 +130,9 @@ function useContextValue() {
|
|||
|
||||
type DocsPreferredVersionContextValue = ReturnType<typeof useContextValue>;
|
||||
|
||||
const Context = createContext<DocsPreferredVersionContextValue | null>(null);
|
||||
const Context = React.createContext<DocsPreferredVersionContextValue | null>(
|
||||
null,
|
||||
);
|
||||
|
||||
export function DocsPreferredVersionContextProvider({
|
||||
children,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue