I try to Refetch every button is click and get a new data
const {refetch,data,isLoading} = useQuery(
"getkurs",() =>fetch( `https://free.currconv.com/api/v7/convert?
q=${selected.country.currencyId}_IDR&compact=ultra&apiKey=${process.env.COUNTRY_API}`).then((res) =>
res.json()),{ enabled: false, refetchOnWindowFocus: false }
);
<button onclick={()=>refetch()}>click</button>
It's only work once but in second and etc it's not working , can someone help me ?