mirror of
https://github.com/haiwen/seahub.git
synced 2025-06-30 08:53:49 +00:00
28 lines
553 B
JavaScript
28 lines
553 B
JavaScript
import React from 'react';
|
|
import ReactDOM from 'react-dom';
|
|
import FileView from './components/file-view/file-view';
|
|
import FileViewTip from './components/file-view/file-view-tip';
|
|
|
|
const { err } = window.app.pageOptions;
|
|
|
|
class ViewFileUnknown extends React.Component {
|
|
render() {
|
|
return (
|
|
<FileView content={<FileContent />} />
|
|
);
|
|
}
|
|
}
|
|
|
|
class FileContent extends React.Component {
|
|
render() {
|
|
if (err) {
|
|
return <FileViewTip />;
|
|
}
|
|
}
|
|
}
|
|
|
|
ReactDOM.render (
|
|
<ViewFileUnknown />,
|
|
document.getElementById('wrapper')
|
|
);
|