From a05f5948fb073f0b5f22e568b084717460c5f83c Mon Sep 17 00:00:00 2001 From: camewell Date: Fri, 6 Sep 2024 11:43:49 +0700 Subject: [PATCH] chore: update code --- .../blockchains/Buy/components3/LaunchButton/index.tsx | 6 +++--- src/modules/blockchains/dapp/hooks/useFetchDapp.tsx | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/modules/blockchains/Buy/components3/LaunchButton/index.tsx b/src/modules/blockchains/Buy/components3/LaunchButton/index.tsx index c2cf9fdfe..575249535 100644 --- a/src/modules/blockchains/Buy/components3/LaunchButton/index.tsx +++ b/src/modules/blockchains/Buy/components3/LaunchButton/index.tsx @@ -479,9 +479,9 @@ const LaunchButton = ({ isUpdate }: { isUpdate?: boolean }) => { if (isConfigDapp) { console.log('[LaunchButton] refresh dapp data'); setTimeout(() => { - // dispatch(requestReload()); - // setUpdated(true); - window.location.reload(); + dispatch(requestReload()); + setUpdated(true); + // window.location.reload(); }, 1000); } getOrderDetailByID(orderDetail.orderId); diff --git a/src/modules/blockchains/dapp/hooks/useFetchDapp.tsx b/src/modules/blockchains/dapp/hooks/useFetchDapp.tsx index 9036a5ed0..c86287443 100644 --- a/src/modules/blockchains/dapp/hooks/useFetchDapp.tsx +++ b/src/modules/blockchains/dapp/hooks/useFetchDapp.tsx @@ -94,7 +94,7 @@ const useFetchDapp = () => { React.useEffect(() => { fetchData(); - }, []); + }, [needReload]); useEffect(() => { if (dappState?.chain?.chainId) {