From 8bb9315c65ee5a93f0541bb7319d19193e3f734e Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 28 Mar 2026 14:17:06 +0000 Subject: [PATCH] Clear error banner when user retries an action Add a useEffect that clears the error state when haveUserCityZip or permissionGranted becomes true, so the banner disappears as soon as the user submits a new location or triggers geolocation. https://claude.ai/code/session_01DWTEwk13M86PwfN2iwV4Uk --- app/page.jsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/page.jsx b/app/page.jsx index a82f25f..c5eb25e 100644 --- a/app/page.jsx +++ b/app/page.jsx @@ -34,6 +34,12 @@ export default function HomePage() { } }, []); + useEffect(() => { + if (haveUserCityZip || permissionGranted) { + setError(null); + } + }, [haveUserCityZip, permissionGranted]); + useInterval(() => { if (coordinates) { fetchConditions();