Commit a7d28d5b authored by Trisno's avatar Trisno

tambah format di redeem code

parent c1d0391c
...@@ -3,6 +3,7 @@ import { View, Text, TextInput, StyleSheet, Button, TouchableOpacity, Alert, Bac ...@@ -3,6 +3,7 @@ import { View, Text, TextInput, StyleSheet, Button, TouchableOpacity, Alert, Bac
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import Axios from 'axios'; import Axios from 'axios';
import ActionType from '../redux/globalActionType'; import ActionType from '../redux/globalActionType';
import NumberFormat from 'react-number-format';
class RedeemCode extends React.Component { class RedeemCode extends React.Component {
...@@ -79,7 +80,8 @@ class RedeemCode extends React.Component { ...@@ -79,7 +80,8 @@ class RedeemCode extends React.Component {
<Text style={{ fontSize: 20, fontFamily: 'Gotham-Black', color: '#838383' }} >Balance</Text> <Text style={{ fontSize: 20, fontFamily: 'Gotham-Black', color: '#838383' }} >Balance</Text>
</View> </View>
<View style={{ flex: 1, margin: 10 }}> <View style={{ flex: 1, margin: 10 }}>
<Text style={{ fontSize: 20, fontFamily: 'Gotham-Black', color: '#838383' }}>{this.props.balance_redeem}</Text> {/* <Text style={{ fontSize: 20, fontFamily: 'Gotham-Black', color: '#838383' }}>{this.props.balance_redeem}</Text> */}
<NumberFormat decimalScale={0} value={this.props.balance_redeem} renderText={value => <Text style={{ fontSize: 20, fontFamily: 'Gotham-Black', color: '#838383' }}>Rp. {value}</Text>} displayType={'text'} thousandSeparator={true} prefix={''} />
</View> </View>
</View> </View>
<View style={styles.current_balance}> <View style={styles.current_balance}>
...@@ -87,7 +89,8 @@ class RedeemCode extends React.Component { ...@@ -87,7 +89,8 @@ class RedeemCode extends React.Component {
<Text style={{ fontSize: 20, fontFamily: 'Gotham-Black', color: '#838383' }} >Points</Text> <Text style={{ fontSize: 20, fontFamily: 'Gotham-Black', color: '#838383' }} >Points</Text>
</View> </View>
<View style={{ flex: 1, margin: 10 }}> <View style={{ flex: 1, margin: 10 }}>
<Text style={{ fontSize: 20, fontFamily: 'Gotham-Black', color: '#838383' }}>{this.props.point_redeem}</Text> {/* <Text style={{ fontSize: 20, fontFamily: 'Gotham-Black', color: '#838383' }}>{this.props.point_redeem}</Text> */}
<NumberFormat decimalScale={0} value={this.props.point_redeem} renderText={value => <Text style={{ fontSize: 20, fontFamily: 'Gotham-Black', color: '#838383' }}>Rp. {value}</Text>} displayType={'text'} thousandSeparator={true} prefix={''} />
</View> </View>
</View> </View>
{/* <View style={styles.redeem}> {/* <View style={styles.redeem}>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment