Compare commits

...
17 Commits
Author SHA1 Message Date
Akinwale Ariwodola ffb31fce16 Merge remote-tracking branch 'origin/reward-range' into rc-next 2019-09-13 18:25:01 +01:00
Akinwale Ariwodola 0cc2973792 Merge remote-tracking branch 'origin/publish-channel-selector' into rc-next 2019-09-13 18:24:43 +01:00
Akinwale Ariwodola 077a98a7e1 merge with channel-creator branch 2019-09-13 18:24:37 +01:00
Akinwale Ariwodola ab9a7f183c remove future release warning 2019-09-13 08:51:46 +01:00
Akinwale Ariwodola 1678731601 fix channel selector issues on publish page 2019-09-13 08:48:33 +01:00
Akinwale Ariwodola 0115025b86 support reward range amount 2019-09-13 08:27:41 +01:00
Akinwale Ariwodola 78f2b4f3be use err.message conditionally, and isChannel from parseURI. 2019-09-13 08:14:24 +01:00
Akinwale Ariwodola 0fe32e1a36 cleanup 2019-09-11 12:36:41 +01:00
Akinwale Ariwodola f008d95aa6 maintain form state when user navigates away 2019-09-11 12:32:54 +01:00
Akinwale Ariwodola c4218d9f8b channel creator updates after review 2019-09-11 08:22:56 +01:00
Akinwale Ariwodola e95786b904 do not list channels in pending abandon state 2019-09-09 15:33:48 +01:00
Akinwale Ariwodola f02fdd9979 channel creator updates 2019-09-09 11:14:53 +01:00
Akinwale Ariwodola 563a9135ce fix merge conflicts 2019-09-09 09:31:23 +01:00
Akinwale Ariwodola 39eb2b1a96 fix tags for edit 2019-09-02 13:31:36 +01:00
Akinwale Ariwodola 2f0014be08 channel creator updates. upload image assets. 2019-09-02 13:03:58 +01:00
Akinwale Ariwodola 27c0ac7585 support optional parameters 2019-08-30 20:03:31 +01:00
Akinwale Ariwodola 44856e1ba1 channel creator page 2019-08-30 18:31:12 +01:00
3 changed files with 22 additions and 11 deletions

No files matched your search

+6 -3
View File
@@ -30,11 +30,14 @@ export default class ChannelSelector extends React.PureComponent {
if (!channels.length && !fetchingChannels) {
fetchChannelListMine();
}
this.setState({ currentSelectedValue: channelName });
}
componentDidUpdate() {
const { channelName } = this.props;
if (this.state.currentSelectedValue !== channelName) {
componentWillReceiveProps(nextProps) {
const { channels: prevChannels = [], channelName } = this.props;
const { channels = [] } = nextProps;
if (channels.length !== prevChannels.length && channelName !== this.state.currentSelectedValue) {
this.setState({ currentSelectedValue: channelName });
}
}
+16 -1
View File
@@ -13,6 +13,7 @@ type Props = {
id: string,
reward_title: string,
reward_amount: number,
reward_range?: string,
transaction_id: string,
created_at: string,
reward_description: string,
@@ -55,6 +56,20 @@ class RewardCard extends React.PureComponent<Props> {
});
};
getDisplayAmount = () => {
const { reward } = this.props;
if (reward) {
if (reward.reward_range && reward.reward_range.includes('-')) {
return reward.reward_range.split('-')[0] + '+'; // ex: 5+
} else if (reward.reward_amount > 0) {
return reward.reward_amount;
}
}
// unknown amount which normally shouldn't happen
return '?';
};
render() {
const { canClaim, isPending, onClaimPress, reward } = this.props;
const claimed = !!reward.transaction_id;
@@ -101,7 +116,7 @@ class RewardCard extends React.PureComponent<Props> {
)}
</View>
<View style={rewardStyle.rightCol}>
<Text style={rewardStyle.rewardAmount}>{reward.reward_amount}</Text>
<Text style={rewardStyle.rewardAmount}>{this.getDisplayAmount()}</Text>
<Text style={rewardStyle.rewardCurrency}>LBC</Text>
</View>
</TouchableOpacity>
-7
View File
@@ -1096,13 +1096,6 @@ class PublishPage extends React.PureComponent {
/>
</View>
<View style={publishStyle.warning}>
<Text style={publishStyle.warningText}>
Please ensure that you have filled everything correctly as you cannot edit published content in this
release. This feature will be available in a future release.
</Text>
</View>
<View style={publishStyle.actionButtons}>
{(this.state.publishStarted || publishFormValues.publishing) && (
<View style={publishStyle.progress}>