From 49721b87c83530ca90f12386665fd7f9b92a03fe Mon Sep 17 00:00:00 2001 From: btzr-io Date: Sun, 14 Oct 2018 15:58:35 -0600 Subject: [PATCH] fix flow errors of fileRender component --- src/renderer/component/fileRender/index.js | 9 ++------- src/renderer/component/fileRender/view.jsx | 2 +- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/renderer/component/fileRender/index.js b/src/renderer/component/fileRender/index.js index 5eba1d818..b9c745707 100644 --- a/src/renderer/component/fileRender/index.js +++ b/src/renderer/component/fileRender/index.js @@ -4,13 +4,8 @@ import { makeSelectClientSetting } from 'redux/selectors/settings'; import FileRender from './view'; -const select = (state, props) => ({ +const select = state => ({ currentTheme: makeSelectClientSetting(THEME)(state), }); -const perform = dispatch => ({}); - -export default connect( - select, - perform -)(FileRender); +export default connect(select)(FileRender); diff --git a/src/renderer/component/fileRender/view.jsx b/src/renderer/component/fileRender/view.jsx index ce0494f6a..b9901564e 100644 --- a/src/renderer/component/fileRender/view.jsx +++ b/src/renderer/component/fileRender/view.jsx @@ -24,7 +24,7 @@ class FileRender extends React.PureComponent { const { source, mediaType, currentTheme } = this.props; // Extract relevant data to render file - const { blob, stream, fileName, fileType, contentType, downloadPath } = source; + const { stream, fileType, contentType, downloadPath } = source; // Human-readable files (scripts and plain-text files) const readableFiles = ['text', 'document', 'script'];