deletet state

This commit is contained in:
2025-08-03 03:11:17 +02:00
parent 7fd3dcdda7
commit c5613f2028

View File

@@ -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<HTMLFormElement>) => {
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);
});
};