From c888e741de4acbe1c8955a399f8089ad4fb8794f Mon Sep 17 00:00:00 2001 From: ShubhDeo <62258741+ShubhDeo@users.noreply.github.com> Date: Wed, 10 Feb 2021 13:26:06 +0530 Subject: [PATCH] userInfo and history added in the dependencies userInfo and history added in the dependencies array so that whenever the user logs out after successfully confirming the order the screen will auto reload. --- frontend/src/screens/OrderScreen.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/screens/OrderScreen.js b/frontend/src/screens/OrderScreen.js index 1b8c87ed8..2c02fd81f 100644 --- a/frontend/src/screens/OrderScreen.js +++ b/frontend/src/screens/OrderScreen.js @@ -74,7 +74,7 @@ const OrderScreen = ({ match, history }) => { setSdkReady(true) } } - }, [dispatch, orderId, successPay, successDeliver, order]) + }, [dispatch, orderId, successPay, successDeliver, order, userInfo, history]) const successPaymentHandler = (paymentResult) => { console.log(paymentResult)