do not list channels in pending abandon state
This commit is contained in:
parent
f02fdd9979
commit
e95786b904
2 changed files with 6 additions and 3 deletions
|
@ -1,5 +1,6 @@
|
|||
import { connect } from 'react-redux';
|
||||
import {
|
||||
selectAbandoningIds,
|
||||
selectBalance,
|
||||
selectMyChannelClaims,
|
||||
selectFetchingMyChannels,
|
||||
|
@ -16,6 +17,7 @@ import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api
|
|||
import ChannelCreator from './view';
|
||||
|
||||
const select = state => ({
|
||||
abandoningClaimIds: selectAbandoningIds(state),
|
||||
channels: selectMyChannelClaims(state),
|
||||
fetchingChannels: selectFetchingMyChannels(state),
|
||||
balance: selectBalance(state),
|
||||
|
|
|
@ -657,8 +657,7 @@ export default class ChannelCreator extends React.PureComponent {
|
|||
};
|
||||
|
||||
render() {
|
||||
const { fetchingChannels, updatingChannel, channels = [], navigation } = this.props;
|
||||
|
||||
const { abandoningClaimIds, fetchingChannels, updatingChannel, channels = [], navigation } = this.props;
|
||||
const {
|
||||
autoStyle,
|
||||
autoStyles,
|
||||
|
@ -680,6 +679,8 @@ export default class ChannelCreator extends React.PureComponent {
|
|||
uploadingImage,
|
||||
} = this.state;
|
||||
|
||||
console.log(abandoningClaimIds);
|
||||
|
||||
return (
|
||||
<View style={channelCreatorStyle.container}>
|
||||
<UriBar
|
||||
|
@ -761,7 +762,7 @@ export default class ChannelCreator extends React.PureComponent {
|
|||
</TouchableOpacity>
|
||||
);
|
||||
}}
|
||||
data={channels}
|
||||
data={channels.filter(channel => !abandoningClaimIds.includes(channel.claim_id))}
|
||||
keyExtractor={(item, index) => item.claim_id}
|
||||
/>
|
||||
)}
|
||||
|
|
Loading…
Reference in a new issue