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 { connect } from 'react-redux';
|
||||||
import {
|
import {
|
||||||
|
selectAbandoningIds,
|
||||||
selectBalance,
|
selectBalance,
|
||||||
selectMyChannelClaims,
|
selectMyChannelClaims,
|
||||||
selectFetchingMyChannels,
|
selectFetchingMyChannels,
|
||||||
|
@ -16,6 +17,7 @@ import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api
|
||||||
import ChannelCreator from './view';
|
import ChannelCreator from './view';
|
||||||
|
|
||||||
const select = state => ({
|
const select = state => ({
|
||||||
|
abandoningClaimIds: selectAbandoningIds(state),
|
||||||
channels: selectMyChannelClaims(state),
|
channels: selectMyChannelClaims(state),
|
||||||
fetchingChannels: selectFetchingMyChannels(state),
|
fetchingChannels: selectFetchingMyChannels(state),
|
||||||
balance: selectBalance(state),
|
balance: selectBalance(state),
|
||||||
|
|
|
@ -657,8 +657,7 @@ export default class ChannelCreator extends React.PureComponent {
|
||||||
};
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { fetchingChannels, updatingChannel, channels = [], navigation } = this.props;
|
const { abandoningClaimIds, fetchingChannels, updatingChannel, channels = [], navigation } = this.props;
|
||||||
|
|
||||||
const {
|
const {
|
||||||
autoStyle,
|
autoStyle,
|
||||||
autoStyles,
|
autoStyles,
|
||||||
|
@ -680,6 +679,8 @@ export default class ChannelCreator extends React.PureComponent {
|
||||||
uploadingImage,
|
uploadingImage,
|
||||||
} = this.state;
|
} = this.state;
|
||||||
|
|
||||||
|
console.log(abandoningClaimIds);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View style={channelCreatorStyle.container}>
|
<View style={channelCreatorStyle.container}>
|
||||||
<UriBar
|
<UriBar
|
||||||
|
@ -761,7 +762,7 @@ export default class ChannelCreator extends React.PureComponent {
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
data={channels}
|
data={channels.filter(channel => !abandoningClaimIds.includes(channel.claim_id))}
|
||||||
keyExtractor={(item, index) => item.claim_id}
|
keyExtractor={(item, index) => item.claim_id}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
Loading…
Reference in a new issue