From 784822fa9a27541294596fe1eea1fdb668d0915a Mon Sep 17 00:00:00 2001 From: "theis.gaedigk" Date: Sun, 3 Aug 2025 03:27:32 +0200 Subject: [PATCH] removed loading state and fixed bug with that --- frontend/src/components/WeatherForm.tsx | 3 --- 1 file changed, 3 deletions(-) diff --git a/frontend/src/components/WeatherForm.tsx b/frontend/src/components/WeatherForm.tsx index f777fcc..bfdd1a9 100644 --- a/frontend/src/components/WeatherForm.tsx +++ b/frontend/src/components/WeatherForm.tsx @@ -9,7 +9,6 @@ import { X } from "lucide-react"; const WeatherCard: React.FC = () => { const [city, setCity] = useState(""); - const [loading, setLoading] = useState(false); const [weatherData, setWeatherData] = useState(false); const getAPIKey = () => Cookies.get("apiKey") || ""; const getUnit = () => localStorage.getItem("unit") || "metric"; @@ -20,7 +19,6 @@ const WeatherCard: React.FC = () => { const handleSubmit = async (event: React.FormEvent) => { event.preventDefault(); - setLoading(true); toast .promise(fetchWeather(city, getAPIKey(), getUnit()), { pending: "Fetching weather data...", @@ -34,7 +32,6 @@ const WeatherCard: React.FC = () => { } else { setWeatherData(false); } - setLoading(false); }); };