pr comments

This commit is contained in:
Mustafa Buyukcelebi 2019-01-10 17:28:54 +03:00
parent d8a1f94a35
commit 5fb2dcb9c4
4 changed files with 14 additions and 26 deletions

View File

@ -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,

View File

@ -1,20 +0,0 @@
import React from 'react';
import { connect } from 'react-redux';
import { RefreshControl } from 'react-native';
const RefreshControlView = ({ refreshing, onRefresh, isDarkTheme }) => (
<RefreshControl
refreshing={refreshing}
onRefresh={onRefresh}
progressBackgroundColor="#357CE6"
tintColor={!isDarkTheme ? '#357ce6' : '#96c0ff'}
titleColor="#fff"
colors={['#fff']}
/>
);
const mapStateToProps = state => ({
currentAccount: state.application.isDarkTheme,
});
export default connect(mapStateToProps)(RefreshControlView);

View File

@ -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));

View File

@ -52,13 +52,21 @@ class WalletView extends PureComponent {
isRefreshing,
selectedUsername,
walletData,
isDarkTheme,
} = this.props;
return (
<ScrollView
refreshControl={
<RefreshControl refreshing={isRefreshing} onRefresh={handleOnWalletRefresh} />
}
refreshControl={(
<RefreshControl
refreshing={isRefreshing}
onRefresh={handleOnWalletRefresh}
progressBackgroundColor="#357CE6"
tintColor={!isDarkTheme ? '#357ce6' : '#96c0ff'}
titleColor="#fff"
colors={['#fff']}
/>
)}
style={styles.scrollView}
>
{!walletData ? (