fix: change button type to submit in ChangeAPI component and update temperature unit logic in WeatherData component

This commit is contained in:
2025-08-01 20:25:03 +02:00
parent 97b5190442
commit 62094299d4
2 changed files with 4 additions and 2 deletions

View File

@@ -64,7 +64,7 @@ const ChangeAPI: React.FC<Props> = ({ currentAPIKey, onClose }) => {
/> />
</div> </div>
<button <button
type="button" type="submit"
className="bg-gradient-to-r from-blue-600 to-blue-400 text-white font-bold px-6 py-3 rounded-xl shadow-lg hover:from-blue-700 hover:to-blue-500 transition-all" className="bg-gradient-to-r from-blue-600 to-blue-400 text-white font-bold px-6 py-3 rounded-xl shadow-lg hover:from-blue-700 hover:to-blue-500 transition-all"
onClick={handleUpdate} onClick={handleUpdate}
> >

View File

@@ -24,7 +24,9 @@ const WeatherData: React.FC = () => {
? "°C" ? "°C"
: localStorage.getItem("unit") === "imperial" : localStorage.getItem("unit") === "imperial"
? "°F" ? "°F"
: "K"} : localStorage.getItem("unit") === "standard"
? "K"
: "°C"}
</p> </p>
<p className="flex items-center justify-center gap-2"> <p className="flex items-center justify-center gap-2">
{weatherData?.sys?.country && ( {weatherData?.sys?.country && (