2019-03-29 07:30:44 +00:00
|
|
|
import React from 'react';
|
2022-12-24 02:41:34 +00:00
|
|
|
import { createRoot } from 'react-dom/client';
|
2019-03-29 07:30:44 +00:00
|
|
|
import SharedFileView from './components/shared-file-view/shared-file-view';
|
|
|
|
import SharedFileViewTip from './components/shared-file-view/shared-file-view-tip';
|
|
|
|
|
|
|
|
const { err } = window.shared.pageOptions;
|
|
|
|
|
|
|
|
class SharedFileViewImage extends React.Component {
|
|
|
|
render() {
|
|
|
|
return <SharedFileView content={<FileContent />} />;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class FileContent extends React.Component {
|
|
|
|
render() {
|
|
|
|
if (err) {
|
|
|
|
return <SharedFileViewTip />;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-12-24 02:41:34 +00:00
|
|
|
const root = createRoot(document.getElementById('wrapper'));
|
|
|
|
root.render(<SharedFileViewImage />);
|