Skip to content

Commit 299a56b

Browse files
homotechsualrohit-gohri
authored andcommitted
Update useThemeContext for changes in Canary.
This fixes issue #116 by applying the fix for the breaking change in the latest canary build.
1 parent b316d21 commit 299a56b

File tree

1 file changed

+2
-2
lines changed
  • packages/docusaurus-theme-redoc/src/theme/Redoc

1 file changed

+2
-2
lines changed

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)