Commit 31d8beef authored by Wahyu Adjie Prasetyo's avatar Wahyu Adjie Prasetyo

placeholder

parent 9749b55e
......@@ -194,8 +194,19 @@ class Auth extends React.Component {
</>
) : this.props.pageEmailConfirmation === true ? (
<>
<Stack.Screen name="Email Confirmation" component={EmailConfirmation} />
<Stack.Screen name="Login" component={Login} />
<Stack.Screen name="Email Confirmation" component={EmailConfirmation} options={{
headerStyle: { backgroundColor: '#CFB368' },
headerTitleContainerStyle: { alignContent: 'center' },
headerTitleAlign: 'center',
headerTintColor: '#fff',
headerTitleStyle: {
alignSelf: 'center',
fontFamily: 'Gotham-Black',
color: 'white',
textAlign: 'center'
}, title: 'EMAIL CONFIRMATION'
}} />
<Stack.Screen name="Login" component={Login} options={{headerShown:false}} />
<Stack.Screen name="LoginWelcome" component={WelcomeLog} options={{
headerShown: false,
}} />
......@@ -301,7 +312,19 @@ class Auth extends React.Component {
title: 'TRANSFER BALANCE'
}} />
<Stack.Screen name="Register" component={Register} />
<Stack.Screen name="Email Confirmation" component={EmailConfirmation} />
<Stack.Screen name="Email Confirmation" component={EmailConfirmation} options={{
headerStyle: { backgroundColor: '#CFB368' },
headerTitleContainerStyle: { alignContent: 'center' },
headerTitleAlign: 'center',
headerTintColor: '#fff',
headerTitleStyle: {
alignSelf: 'center',
fontFamily: 'Gotham-Black',
fontSize: 20,
color: 'white',
textAlign: 'center'
}, title: 'EMAIL CONFIRMATION'
}} />
<Stack.Screen name="Upgrade Premium" component={UpgradePremium}
options={{
headerStyle: { backgroundColor: '#CFB368' },
......
......@@ -154,9 +154,11 @@ class CardActivation extends React.Component {
}
{
this.state.timer === 0 ? (
<View style={{ width: 90, height: 40, alignSelf: 'center', margin: 20, top: 0 }}>
<Button title="Resend Token" onPress={() => this.ResendToken()}></Button>
<TouchableOpacity onPress={() => this.ResendToken()}>
<View style={{ height: 40, borderRadius: 20, backgroundColor: '#CFB368', margin: 20, justifyContent: 'center' }}>
<Text style={{ fontFamily: 'Gotham-Black', color: 'white', fontSize: 20, textAlign: 'center', margin: 15 }}>Resend Token</Text>
</View>
</TouchableOpacity>
) : (null)}
<View style={styles.field_email}>
......
......@@ -31,7 +31,8 @@ class Home extends React.Component {
my_long: 0,
indicator: true,
slider_height: 350,
slugs: []
slugs: [],
placeholder: true
}
}
......@@ -81,8 +82,6 @@ class Home extends React.Component {
let latitude = location.coords.latitude;
let longitude = location.coords.longitude;
this.setState({
my_lat: latitude,
my_long: longitude
......@@ -111,10 +110,11 @@ class Home extends React.Component {
}
this.setState({
images: imageLink,
slugs: slugs
slugs: slugs,
placeholder: false
})
}).catch(error =>{
}).catch(error => {
const { navigation } = this.props
let response = error.response.data
session(response, navigation)
......@@ -142,11 +142,9 @@ class Home extends React.Component {
indicator: false
})
}).catch(error => {
// console.log("INI ERROR " + error);
// const { navigation } = this.props
// let response = error.response.data
// session(response, navigation)
// Alert.alert(response.msg);
let response = error.response.data
session(response, navigation)
Alert.alert(response.msg);
})
}
......@@ -174,17 +172,17 @@ class Home extends React.Component {
indicator: false
})
}).catch(error => {
const { navigation } = this.props
let response_data = error.response.data
let error_status = error.response.status
session(response_data,error_status,navigation)
session(response_data, error_status, navigation)
})
}
_useBalance(){
if(this.props.in_payment){
_useBalance() {
if (this.props.in_payment) {
this.props.navigation.navigate('Redeem Code')
} else {
this.props.navigation.navigate('UseBalance')
......@@ -211,7 +209,6 @@ class Home extends React.Component {
} else {
Alert.alert('Belum dapat outlet terdekat')
}
}
render() {
......@@ -232,40 +229,50 @@ class Home extends React.Component {
</TouchableOpacity>
</View>
</View>
<SliderBox
images={this.state.images}
onCurrentImagePressed={index => console.log(`image ${index} pressed`)}
autoplay
circleLoop
dotColor='black'
inactiveDotColor='white'
sliderBoxHeight={this.state.slider_height}
paginationBoxVerticalPadding={20}
resizeMethod={'resize'}
resizeMode={'stretch'}
paginationBoxStyle={{
position: "absolute",
bottom: 0,
padding: 0,
alignItems: 'center',
alignSelf: 'center',
justifyContent: 'center',
paddingVertical: 10,
}}
dotStyle={{
width: 10,
height: 10,
borderRadius: 5,
marginHorizontal: 0,
padding: 0,
margin: 0,
}}
ImageComponentStyle={{
width: '100%',
}}
imageLoadingColor='#c7c7c7'
onCurrentImagePressed={(index) => this.props.navigation.navigate('News Detail', {slug: this.state.slugs[index]})}
/>
<View style={{flex:2}}>
{
this.state.images.length ? (
<SliderBox
images={this.state.images}
onCurrentImagePressed={index => console.log(`image ${index} pressed`)}
autoplay
circleLoop
dotColor='black'
inactiveDotColor='white'
sliderBoxHeight={this.state.slider_height}
paginationBoxVerticalPadding={20}
resizeMethod={'resize'}
resizeMode={'stretch'}
paginationBoxStyle={{
position: "absolute",
bottom: 0,
padding: 0,
alignItems: 'center',
alignSelf: 'center',
justifyContent: 'center',
paddingVertical: 10,
}}
dotStyle={{
width: 10,
height: 10,
borderRadius: 5,
marginHorizontal: 0,
padding: 0,
margin: 0,
}}
ImageComponentStyle={{
width: '100%',
}}
imageLoadingColor='#c7c7c7'
onCurrentImagePressed={(index) => this.props.navigation.navigate('News Detail', { slug: this.state.slugs[index] })}
/>
) : (
<View style={{height : this.state.slider_height, backgroundColor: '#838383',justifyContent:'center'}}>
<ActivityIndicator size="large" color="#c9af6d" />
</View>
)
}
</View>
</View>
<View style={styles.content}>
<View style={styles.card}>
......@@ -287,13 +294,13 @@ class Home extends React.Component {
{/* <Text style={{ textAlign: 'center', fontSize: 12, }}>
{i18n.t('orderInfo')}
</Text> */}
<Text style={{ textAlign: 'center', fontSize: 12, fontFamily: 'Gotham-Black', color:'#838383' }}>
<Text style={{ textAlign: 'center', fontSize: 12, fontFamily: 'Gotham-Black', color: '#838383' }}>
YOU WILL PICKUP YOUR ORDER AT
</Text>
{this.state.indicator == true ? (
<ActivityIndicator size="small" color="#c9af6d" />
) : (
<Text style={{ textAlign: "center", fontSize: 12, top: 5, fontFamily: 'Gotham-Light', color:'#838383' }}>
<Text style={{ textAlign: "center", fontSize: 12, top: 5, fontFamily: 'Gotham-Light', color: '#838383' }}>
Excelso {this.props.name_outlet}
</Text>
)}
......@@ -335,7 +342,7 @@ class Home extends React.Component {
{/* <Text>
YOUR CARD NUMBER | {this.state.expire_date}
</Text> */}
<View style={{ flexDirection: 'row', flex: 1, paddingBottom:5 }}>
<View style={{ flexDirection: 'row', flex: 1, paddingBottom: 5 }}>
<View style={{ flex: 0.5 }}>
<Text style={{ fontSize: 10, fontFamily: 'Gotham-Light' }}>YOUR CARD NUMBER</Text>
</View>
......@@ -360,8 +367,8 @@ class Home extends React.Component {
{/* <Text>{i18n.t('balance')}</Text> */}
<Text style={{ fontSize: 14, fontFamily: 'Gotham-Light' }}>BALANCE</Text>
</View>
<View style={{ flex: 0.7, alignItems:'center'}}>
<Text style={{ fontSize: 14, fontFamily: 'Gotham-Black', color:'gray' }}>IDR {this.state.balance}</Text>
<View style={{ flex: 0.7, alignItems: 'center' }}>
<Text style={{ fontSize: 14, fontFamily: 'Gotham-Black', color: 'gray' }}>IDR {this.state.balance}</Text>
</View>
</View>
......@@ -375,13 +382,13 @@ class Home extends React.Component {
{/* <Text>{i18n.t('balance')}</Text> */}
<Text style={{ fontSize: 14, fontFamily: 'Gotham-Light' }}>POINTS</Text>
</View>
<View style={{ flex: 0.7,alignItems:'center' }}>
<Text style={{ fontSize: 14, fontFamily: 'Gotham-Black', color:'gray' }}>IDR {this.state.point}</Text>
<View style={{ flex: 0.7, alignItems: 'center' }}>
<Text style={{ fontSize: 14, fontFamily: 'Gotham-Black', color: 'gray' }}>IDR {this.state.point}</Text>
</View>
</View>
</Card>
</View>
)
}
<View style={{ flexDirection: 'row', flex: 1 }}>
......@@ -389,14 +396,14 @@ class Home extends React.Component {
// style={styles.submitUpgradePemium}
activeOpacity={.5} onPress={() => this.props.navigation.navigate('TopUpInfo')}>
<View style={styles.topUseBalance}>
<Text style={{ textAlign: 'center', color: 'white', fontFamily: 'Gotham-Black', fontSize: 16 }}>TOP BALANCE </Text>
<Text style={{ textAlign: 'center', color: 'white', fontFamily: 'Gotham-Black', fontSize: 15 }}>TOP BALANCE </Text>
</View>
</TouchableOpacity>
<TouchableOpacity
<TouchableOpacity
// style={styles.submitUpgradePemium}
activeOpacity={.5} onPress={() => this._useBalance()}>
<View style={styles.topUseBalance}>
<Text style={{ textAlign: 'center', color: 'white', fontFamily: 'Gotham-Black', fontSize: 16 }}>USE BALANCE </Text>
<Text style={{ textAlign: 'center', color: 'white', fontFamily: 'Gotham-Black', fontSize: 15 }}>USE BALANCE </Text>
</View>
</TouchableOpacity>
</View>
......@@ -439,8 +446,8 @@ const styles = StyleSheet.create({
alignItems: 'center'
},
buttonDelivery: {
justifyContent:'center',
height:40,
justifyContent: 'center',
height: 40,
marginTop: 10,
paddingTop: 15,
paddingBottom: 15,
......@@ -454,7 +461,7 @@ const styles = StyleSheet.create({
top: -20,
},
buttonPickup: {
justifyContent:'center',
justifyContent: 'center',
height: 40,
marginTop: 10,
paddingTop: 15,
......@@ -470,9 +477,9 @@ const styles = StyleSheet.create({
},
submitOrder: {
height:40,
height: 40,
margin: 10,
paddingTop:10,
paddingTop: 10,
backgroundColor: '#CFB368',
borderRadius: 10,
borderWidth: 0,
......@@ -481,10 +488,10 @@ const styles = StyleSheet.create({
topUseBalance: {
flex: 0.5,
height:40,
height: 40,
backgroundColor: 'green',
top: 20,
margin:5,
margin: 5,
padding: 10,
paddingHorizontal: 15,
borderRadius: 10,
......
......@@ -117,7 +117,8 @@ class MenuConfirmation extends React.Component {
}).catch(error => {
console.log(error.response)
if (error.response.status <= 500) {
Alert.alert(String(error.response.status), 'Internal Server Error')
let response = error.response.data;
Alert.alert('',response.msg);
} else {
let response = error.response.data;
Alert.alert('', response.msg);
......
......@@ -353,6 +353,7 @@ const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: 'white',
},
// shadow: {
......
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