changed minus place and enhanced

This commit is contained in:
u-e 2019-07-29 23:34:00 +03:00
parent 0db97ab585
commit 592e3969cf
2 changed files with 77 additions and 76 deletions

View File

@ -43,7 +43,6 @@ class BoostPostScreen extends PureComponent {
SCPath: '',
permlinkSuggestions: [],
isValid: false,
calculatedESTM: 150,
};
this.startActionSheet = React.createRef();
@ -192,7 +191,6 @@ class BoostPostScreen extends PureComponent {
}
/>
<Text style={styles.balanceText}>{`${balance || _balance} ESTM`}</Text>
<Fragment>
<View style={styles.autocomplateLineContainer}>
<View style={styles.autocomplateLabelContainer}>
{
@ -236,41 +234,17 @@ class BoostPostScreen extends PureComponent {
)}
/>
</View>
</Fragment>
<View style={styles.total}>
<Text style={styles.day}>
<Text style={styles.price}>
{`${getESTMPrice(calculatedESTM).toFixed(3)} $ `}
</Text>
<Text style={styles.price}>{`${calculatedESTM} ESTM`}</Text>
<Text style={styles.esteem}>{`${calculatedESTM} ESTM`}</Text>
</View>
<View
style={{
justifyContent: 'center',
alignItems: 'center',
flexDirection: 'row',
}}
>
<View style={styles.quickButtonsWrapper}>
<MainButton
style={{ width: 55, height: 55, justifyContent: 'center' }}
isDisable={!(_balance / 50 > factor + 4)}
onPress={() =>
this.setState({
factor: _balance / 50 > factor + 4 ? factor + 1 : factor,
})
}
>
<Icon
size={24}
style={{ color: 'white' }}
iconType="MaterialIcons"
name="add"
/>
</MainButton>
<MainButton
style={{ width: 55, height: 55, justifyContent: 'center' }}
style={styles.quickButtons}
isDisable={!(calculatedESTM > 150)}
onPress={() =>
this.setState({
@ -285,6 +259,23 @@ class BoostPostScreen extends PureComponent {
name="minus"
/>
</MainButton>
<MainButton
style={styles.quickButtons}
isDisable={!(_balance / 50 > factor + 4)}
onPress={() =>
this.setState({
factor: _balance / 50 > factor + 4 ? factor + 1 : factor,
})
}
>
<Icon
size={24}
style={{ color: 'white' }}
iconType="MaterialIcons"
name="add"
/>
</MainButton>
</View>
</View>

View File

@ -150,13 +150,23 @@ export default EStyleSheet.create({
justifyContent: 'center',
alignItems: 'center',
},
day: {
price: {
fontSize: 22,
color: '$primaryBlue',
fontWeight: 'bold',
},
price: {
esteem: {
fontSize: 15,
color: '$primaryBlue',
},
quickButtons: {
width: 55,
height: 55,
justifyContent: 'center',
},
quickButtonsWrapper: {
justifyContent: 'center',
alignItems: 'center',
flexDirection: 'row',
},
});