mirror of
https://github.com/laurent22/joplin.git
synced 2025-02-07 19:30:04 +02:00
Chore: Fix warning in PDF Viewer
This commit is contained in:
parent
4fd4360c18
commit
58da15432f
@ -1,7 +1,7 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import shim from '@joplin/lib/shim';
|
import shim from '@joplin/lib/shim';
|
||||||
shim.setReact(React);
|
shim.setReact(React);
|
||||||
import { render } from 'react-dom';
|
const { createRoot } = require('react-dom/client');
|
||||||
import * as pdfjsLib from 'pdfjs-dist';
|
import * as pdfjsLib from 'pdfjs-dist';
|
||||||
import MiniViewerApp from './miniViewer';
|
import MiniViewerApp from './miniViewer';
|
||||||
import MessageService from './messageService';
|
import MessageService from './messageService';
|
||||||
@ -42,7 +42,5 @@ function App() {
|
|||||||
return <div>Error: Unknown app type "{type}"</div>;
|
return <div>Error: Unknown app type "{type}"</div>;
|
||||||
}
|
}
|
||||||
|
|
||||||
render(
|
const root = createRoot(document.getElementById('pdf-root'));
|
||||||
<App/>,
|
root.render(<App/>);
|
||||||
document.getElementById('pdf-root')
|
|
||||||
);
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user