Corrige diversos toasts

This commit is contained in:
Matheus Albino Brunhara
2022-09-03 16:20:57 -03:00
parent 41fd7ea0b6
commit df4fe0ffef
13 changed files with 147 additions and 12 deletions

View File

@@ -4,4 +4,9 @@ export async function autoCompleteAddress(address:string) {
const response = await instance.get(`https://api.geoapify.com/v1/geocode/autocomplete?text=${address}&apiKey=ee574aacff6f440a84378bbbf7e2f20d`);
return response.data.features;
}
export async function closeToast(setShowToast: React.Dispatch<React.SetStateAction<boolean>>) {
setShowToast(false)
window.history.replaceState({}, document.title)
}