Skip to content

Commit

Permalink
Merge pull request #117 from homotechsual/main
Browse files Browse the repository at this point in the history
  • Loading branch information
rohit-gohri committed Jan 28, 2022
2 parents b316d21 + f753e33 commit f285992
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
usePluginData,
useAllPluginInstancesData,
} from '@docusaurus/useGlobalData';
import useThemeContext from '@theme/hooks/useThemeContext';
import { useColorMode } from '@docusaurus/theme-common';
import clsx from 'clsx';
import { ThemeProvider } from 'styled-components';
import { SchemaDefinition, AppStore } from 'redoc';
Expand All @@ -17,7 +17,7 @@ const ApiSchema: React.FC<Props> = ({
pointer,
...rest
}: Props): JSX.Element => {
const { isDarkTheme } = useThemeContext();
const { isDarkTheme } = useColorMode();
const allData = useAllPluginInstancesData<Spec>('docusaurus-plugin-redoc');
const { lightTheme, darkTheme, redocOptions } = usePluginData<GlobalData>(
'docusaurus-theme-redoc',
Expand Down
4 changes: 2 additions & 2 deletions packages/docusaurus-theme-redoc/src/theme/Redoc/Redoc.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useMemo } from 'react';
import { usePluginData } from '@docusaurus/useGlobalData';
import useThemeContext from '@theme/hooks/useThemeContext';
import { useColorMode } from '@docusaurus/theme-common';
import { Redoc as RedocComponent, RedocStandalone, AppStore } from 'redoc';
import { RedocProps as Props, GlobalData } from '../../types/common';
import './styles.css';
Expand All @@ -12,7 +12,7 @@ import './styles.css';
* Released under the MIT License
*/
function Redoc(props: Props): JSX.Element {
const { isDarkTheme } = useThemeContext();
const { isDarkTheme } = useColorMode();
const { lightTheme, darkTheme, redocOptions } = usePluginData<GlobalData>(
'docusaurus-theme-redoc',
);
Expand Down

0 comments on commit f285992

Please sign in to comment.