diff --git a/src/pages/Payment/index.js b/src/pages/Payment/index.js index a0ad2d5..0eec1f3 100644 --- a/src/pages/Payment/index.js +++ b/src/pages/Payment/index.js @@ -50,12 +50,9 @@ const Index = () => { useEffect(() => { if(id<0)return; - if(location.state.amount > 0 ){ - setTotalAmount(location.state.amount) - }else{ - //fake - setTotalAmount(2000) - } + let amount = location.state?.amount??2000; + + setTotalAmount(amount) getAvailablePayment() getTransactionId() }, []);