1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-07-18 17:22:05 +00:00
seahub/frontend/src/shared-file-view-unknown.js

24 lines
629 B
JavaScript
Raw Normal View History

import React from 'react';
import { createRoot } from 'react-dom/client';
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 />;
}
}
}
const root = createRoot(document.getElementById('wrapper'));
root.render(<SharedFileViewImage />);