Skip to content

Commit f285992

Browse files
authored
Merge pull request #117 from homotechsual/main
2 parents b316d21 + f753e33 commit f285992

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

packages/docusaurus-theme-redoc/src/theme/ApiSchema/ApiSchema.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import {
33
usePluginData,
44
useAllPluginInstancesData,
55
} from '@docusaurus/useGlobalData';
6-
import useThemeContext from '@theme/hooks/useThemeContext';
6+
import { useColorMode } from '@docusaurus/theme-common';
77
import clsx from 'clsx';
88
import { ThemeProvider } from 'styled-components';
99
import { SchemaDefinition, AppStore } from 'redoc';
@@ -17,7 +17,7 @@ const ApiSchema: React.FC<Props> = ({
1717
pointer,
1818
...rest
1919
}: Props): JSX.Element => {
20-
const { isDarkTheme } = useThemeContext();
20+
const { isDarkTheme } = useColorMode();
2121
const allData = useAllPluginInstancesData<Spec>('docusaurus-plugin-redoc');
2222
const { lightTheme, darkTheme, redocOptions } = usePluginData<GlobalData>(
2323
'docusaurus-theme-redoc',

packages/docusaurus-theme-redoc/src/theme/Redoc/Redoc.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React, { useMemo } from 'react';
22
import { usePluginData } from '@docusaurus/useGlobalData';
3-
import useThemeContext from '@theme/hooks/useThemeContext';
3+
import { useColorMode } from '@docusaurus/theme-common';
44
import { Redoc as RedocComponent, RedocStandalone, AppStore } from 'redoc';
55
import { RedocProps as Props, GlobalData } from '../../types/common';
66
import './styles.css';
@@ -12,7 +12,7 @@ import './styles.css';
1212
* Released under the MIT License
1313
*/
1414
function Redoc(props: Props): JSX.Element {
15-
const { isDarkTheme } = useThemeContext();
15+
const { isDarkTheme } = useColorMode();
1616
const { lightTheme, darkTheme, redocOptions } = usePluginData<GlobalData>(
1717
'docusaurus-theme-redoc',
1818
);

0 commit comments

Comments
 (0)