import { useState } from "react"; import React from "react"; import { changeAPIcookie } from "../utils/changeAPIcookie"; import { KeyRound } from "lucide-react"; interface Props { currentAPIKey: string; onClose: () => void; } const ChangeAPI: React.FC = ({ currentAPIKey, onClose }) => { const [apiKey, setApiKey] = useState(currentAPIKey); const handleUpdate = () => { changeAPIcookie(apiKey); onClose(); }; return (

Change API Key

Update your API key to fetch weather data.

We are using

OpenWeatherMap

API for fetching weather data.

setApiKey(e.target.value)} required className="border border-blue-300 rounded-xl px-6 py-3 focus:outline-none focus:ring-2 focus:ring-blue-400 bg-blue-50 text-blue-900 font-mono w-full" />
); }; export default ChangeAPI;