fix: change button type to submit in ChangeAPI component and update temperature unit logic in WeatherData component
This commit is contained in:
@@ -64,7 +64,7 @@ const ChangeAPI: React.FC<Props> = ({ currentAPIKey, onClose }) => {
|
||||
/>
|
||||
</div>
|
||||
<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"
|
||||
onClick={handleUpdate}
|
||||
>
|
||||
|
@@ -24,7 +24,9 @@ const WeatherData: React.FC = () => {
|
||||
? "°C"
|
||||
: localStorage.getItem("unit") === "imperial"
|
||||
? "°F"
|
||||
: "K"}
|
||||
: localStorage.getItem("unit") === "standard"
|
||||
? "K"
|
||||
: "°C"}
|
||||
</p>
|
||||
<p className="flex items-center justify-center gap-2">
|
||||
{weatherData?.sys?.country && (
|
||||
|
Reference in New Issue
Block a user