From 5fb2dcb9c4fb07c963abbf3073a5027143383590 Mon Sep 17 00:00:00 2001 From: Mustafa Buyukcelebi Date: Thu, 10 Jan 2019 17:28:54 +0300 Subject: [PATCH] pr comments --- src/components/basicUIElements/index.js | 2 -- .../view/refreshControl/refreshControlView.js | 20 ------------------- .../wallet/container/walletContainer.js | 4 +++- src/components/wallet/view/walletView.js | 14 ++++++++++--- 4 files changed, 14 insertions(+), 26 deletions(-) delete mode 100644 src/components/basicUIElements/view/refreshControl/refreshControlView.js diff --git a/src/components/basicUIElements/index.js b/src/components/basicUIElements/index.js index 528f1fc8e..ef0a23158 100644 --- a/src/components/basicUIElements/index.js +++ b/src/components/basicUIElements/index.js @@ -6,7 +6,6 @@ import NoPost from './view/noPost/noPostView'; import PostCardPlaceHolder from './view/placeHolder/postCardPlaceHolderView'; import PostPlaceHolder from './view/placeHolder/postPlaceHolderView'; import ProfileSummaryPlaceHolder from './view/placeHolder/profileSummaryPlaceHolder'; -import RefreshControl from './view/refreshControl/refreshControlView'; import StickyBar from './view/stickyBar/stickyBarView'; import Tag from './view/tag/tagView'; import TextWithIcon from './view/textWithIcon/textWithIconView'; @@ -24,7 +23,6 @@ export { PostCardPlaceHolder, PostPlaceHolder, ProfileSummaryPlaceHolder, - RefreshControl, StickyBar, Tag, TextWithIcon, diff --git a/src/components/basicUIElements/view/refreshControl/refreshControlView.js b/src/components/basicUIElements/view/refreshControl/refreshControlView.js deleted file mode 100644 index 64b751c49..000000000 --- a/src/components/basicUIElements/view/refreshControl/refreshControlView.js +++ /dev/null @@ -1,20 +0,0 @@ -import React from 'react'; -import { connect } from 'react-redux'; -import { RefreshControl } from 'react-native'; - -const RefreshControlView = ({ refreshing, onRefresh, isDarkTheme }) => ( - -); - -const mapStateToProps = state => ({ - currentAccount: state.application.isDarkTheme, -}); - -export default connect(mapStateToProps)(RefreshControlView); diff --git a/src/components/wallet/container/walletContainer.js b/src/components/wallet/container/walletContainer.js index 5d9adbc0d..9a337d267 100644 --- a/src/components/wallet/container/walletContainer.js +++ b/src/components/wallet/container/walletContainer.js @@ -109,7 +109,7 @@ class WalletContainer extends Component { }; render() { - const { currentAccount, selectedUser } = this.props; + const { currentAccount, selectedUser, isDarkTheme } = this.props; const { walletData, claiming, isRefreshing } = this.state; return ( @@ -121,6 +121,7 @@ class WalletContainer extends Component { claiming={claiming} handleOnWalletRefresh={this._handleOnWalletRefresh} isRefreshing={isRefreshing} + isDarkTheme={isDarkTheme} /> ); } @@ -129,6 +130,7 @@ class WalletContainer extends Component { const mapStateToProps = state => ({ currentAccount: state.account.currentAccount, pinCode: state.account.pin, + isDarkTheme: state.application.isDarkTheme, }); export default injectIntl(connect(mapStateToProps)(WalletContainer)); diff --git a/src/components/wallet/view/walletView.js b/src/components/wallet/view/walletView.js index 379ba566f..5add09b1e 100644 --- a/src/components/wallet/view/walletView.js +++ b/src/components/wallet/view/walletView.js @@ -52,13 +52,21 @@ class WalletView extends PureComponent { isRefreshing, selectedUsername, walletData, + isDarkTheme, } = this.props; return ( - } + refreshControl={( + + )} style={styles.scrollView} > {!walletData ? (