Commit be5fa969 authored by Wahyu Adjie Prasetyo's avatar Wahyu Adjie Prasetyo

hilangin console.log

parent fbb969aa
...@@ -289,7 +289,7 @@ const rootReducer = (state = globalState, action) => { ...@@ -289,7 +289,7 @@ const rootReducer = (state = globalState, action) => {
update.quantity = 1 update.quantity = 1
} }
update.quantity += 1 update.quantity += 1
// console.log('Update : ' + JSON.stringify(update)) console.log('Update : ' + JSON.stringify(update))
data = { ...old_data, ...update } data = { ...old_data, ...update }
} }
...@@ -300,7 +300,7 @@ const rootReducer = (state = globalState, action) => { ...@@ -300,7 +300,7 @@ const rootReducer = (state = globalState, action) => {
} else { } else {
// add // add
addedItem.quantity = 1 addedItem.quantity = 1
// console.log('Baru : ' + JSON.stringify(addedItem)) console.log('Baru : ' + JSON.stringify(addedItem))
order_item = [...state.order_item, addedItem] order_item = [...state.order_item, addedItem]
} }
...@@ -358,7 +358,7 @@ const rootReducer = (state = globalState, action) => { ...@@ -358,7 +358,7 @@ const rootReducer = (state = globalState, action) => {
data = null data = null
} else { } else {
update.quantity -= 1 update.quantity -= 1
// console.log('Update : ' + JSON.stringify(update)) console.log('Update : ' + JSON.stringify(update))
data = { ...old_data, ...update } data = { ...old_data, ...update }
} }
} }
...@@ -438,7 +438,7 @@ const rootReducer = (state = globalState, action) => { ...@@ -438,7 +438,7 @@ const rootReducer = (state = globalState, action) => {
let quantity = state.order_quantity let quantity = state.order_quantity
let total = parseInt(state.order_total) - parseInt(addedItem.price) let total = parseInt(state.order_total) - parseInt(addedItem.price)
// console.log("UPDATE " + order_item) console.log("UPDATE " + order_item)
} }
return { return {
......
...@@ -20,13 +20,13 @@ class MenuConfirmation extends React.Component { ...@@ -20,13 +20,13 @@ class MenuConfirmation extends React.Component {
} }
componentDidMount(){ componentDidMount(){
// console.log(" DESTINASI : "+ this.props.grabdestination) console.log(" DESTINASI : "+ this.props.grabdestination)
// console.log("ONGKIR"+ this.props.grabamount) console.log("ONGKIR"+ this.props.grabamount)
// console.log("drop off"+this.props.grabdropoff) console.log("drop off"+this.props.grabdropoff)
// console.log("pickup"+this.props.grabpickup) console.log("pickup"+this.props.grabpickup)
// console.log("type" +this.props.grabtype) console.log("type" +this.props.grabtype)
// console.log("BALANCED" +this.props.balanceUsed) console.log("BALANCED" +this.props.balanceUsed)
// console.log("POINT" +this.props.pointsused) console.log("POINT" +this.props.pointsused)
} }
...@@ -71,7 +71,7 @@ class MenuConfirmation extends React.Component { ...@@ -71,7 +71,7 @@ class MenuConfirmation extends React.Component {
); );
}).catch(error => { }).catch(error => {
let response = error.response.data; let response = error.response.data;
// console.log('error') console.log('error')
Alert.alert(response.msg); Alert.alert(response.msg);
this.setState({ this.setState({
spinner: false, spinner: false,
...@@ -81,15 +81,14 @@ class MenuConfirmation extends React.Component { ...@@ -81,15 +81,14 @@ class MenuConfirmation extends React.Component {
orderSuccess = () => { orderSuccess = () => {
this.props.setOrderFinish() this.props.setOrderFinish()
this.props.navigation.navigate('Home', { this.props.navigation.reset({
screen: 'ORDER', routes: [{ name: 'Home' }]
params: { user: 'jax' }, })
});
} }
render() { render() {
// console.log(this.props) console.log(this.props)
let total = 0 let total = 0
return ( return (
<ScrollView style={styles.container}> <ScrollView style={styles.container}>
...@@ -230,7 +229,7 @@ const mapDispatchToProps = (dispacth) => { ...@@ -230,7 +229,7 @@ const mapDispatchToProps = (dispacth) => {
} }
const mapStateToProps = (state) => { const mapStateToProps = (state) => {
// console.log(state) console.log(state)
return { return {
session_id: state.session_id, session_id: state.session_id,
type_pickup: state.type_pickup, type_pickup: state.type_pickup,
......
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