mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-22 20:47:53 +02:00
fix(debug-plugin): upgrade react-json-view to maintained React-18 compatible fork (#9116)
This commit is contained in:
parent
cde35d0f1f
commit
e8c1312793
5 changed files with 26 additions and 32 deletions
|
@ -8,7 +8,7 @@
|
|||
import React from 'react';
|
||||
import BrowserOnly from '@docusaurus/BrowserOnly';
|
||||
import type {Props} from '@theme/DebugJsonView';
|
||||
import type {ReactJsonViewProps} from 'react-json-view';
|
||||
import type {ReactJsonViewProps} from '@microlink/react-json-view';
|
||||
|
||||
// Avoids "react-json-view" displaying "root"
|
||||
const RootName = null;
|
||||
|
@ -21,7 +21,7 @@ function BrowserOnlyReactJson(props: ReactJsonViewProps) {
|
|||
{() => {
|
||||
const {default: ReactJson} =
|
||||
// eslint-disable-next-line global-require, @typescript-eslint/no-var-requires
|
||||
require('react-json-view') as typeof import('react-json-view');
|
||||
require('@microlink/react-json-view') as typeof import('@microlink/react-json-view');
|
||||
return <ReactJson {...props} />;
|
||||
}}
|
||||
</BrowserOnly>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue