parent
7e3c0143d1
commit
e6a044d8e1
2 changed files with 4 additions and 7 deletions
|
@ -168,7 +168,7 @@ class FileRender extends React.PureComponent<Props, State> {
|
|||
/>
|
||||
);
|
||||
case RENDER_MODES.COMIC:
|
||||
return <ComicBookViewer source={{ fileExtension, downloadPath }} theme={currentTheme} />;
|
||||
return <ComicBookViewer source={downloadPath} theme={currentTheme} />;
|
||||
case RENDER_MODES.APPLICATION:
|
||||
return <AppViewer uri={uri} />;
|
||||
}
|
||||
|
|
|
@ -5,10 +5,7 @@ import 'villain-react/dist/style.css';
|
|||
|
||||
type Props = {
|
||||
theme: string,
|
||||
source: {
|
||||
fileType: string,
|
||||
downloadPath: string,
|
||||
},
|
||||
source: string,
|
||||
};
|
||||
|
||||
let workerUrl = 'webworkers/worker-bundle.js';
|
||||
|
@ -20,9 +17,9 @@ if (process.env.NODE_ENV !== 'production') {
|
|||
|
||||
class ComicBookViewer extends React.PureComponent<Props> {
|
||||
render() {
|
||||
const { downloadPath } = this.props.source || {};
|
||||
const { source } = this.props || {};
|
||||
// Archive source
|
||||
const file = `file://${downloadPath}`;
|
||||
const file = `file://${source}`;
|
||||
// Villain options
|
||||
const opts = {
|
||||
theme: this.props.theme === 'dark' ? 'Dark' : 'Light',
|
||||
|
|
Loading…
Add table
Reference in a new issue