From 77c01683aea95a2859a9100e0497fa4e96efbe5a Mon Sep 17 00:00:00 2001 From: victorAnumudu Date: Wed, 8 Oct 2025 07:01:56 +0100 Subject: [PATCH] fixed country signup and status change refresh --- src/components/country/CountrySettings.jsx | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/src/components/country/CountrySettings.jsx b/src/components/country/CountrySettings.jsx index 4111337..b5e2841 100644 --- a/src/components/country/CountrySettings.jsx +++ b/src/components/country/CountrySettings.jsx @@ -24,6 +24,7 @@ export default function CountrySettings(){ staleTime: 0 // 0 mins }) const countryData = data?.data?.country_data // COUNTRY LIST + // console.log('countryData', countryData) const statusChange = useMutation({ @@ -48,7 +49,7 @@ export default function CountrySettings(){ const handleStatusChange = (event, details) => { setSelected(event.target.id) const name = event.target.name - const val = name.toLowerCase() == 'STATUS' ? details.status : details.signup + const val = name.toUpperCase() == 'STATUS' ? details.status : details.signup const reqData = { 'val_type': name.toUpperCase(), 'country_uid': details?.country_uid, @@ -66,13 +67,15 @@ export default function CountrySettings(){ <> {/* status === 'pending' */} - {isFetching ? + {status === 'pending' ?

Loading...

: isError ?

{error.message}

: - - {({ data }) => ( + // + // {({ data }) => ( + // )} + // <> @@ -92,7 +95,7 @@ export default function CountrySettings(){ - {(data && data.length > 0) ? data?.map((item, index) => ( + {(countryData && countryData.length > 0) ? countryData?.map((item, index) => (
@@ -167,14 +170,7 @@ export default function CountrySettings(){
- )} -
} - {/* {(isFetching && status != 'pending') && -
-

Loading...

-
- } */} -- 2.34.1