I'm stuck on making component work.

I think it's something to do with handleChange but I can't figure it out.
import React, { useState } from 'react';
export default function FindCountry({ setNews }) {
const [idInput, setIdInput] = useState('');
const [errors, setErrors] = useState('');
function getCountryID() {
const url = `https://newsapi.org/v2/top-headlines?country=${idInput}&apiKey=${process.env.REACT_APP_GIPHY_KEY}`;
fetch(url)
.then((res) => res.json())
.then((res) => {
console.log('We have data!', res);
setIdInput(res);
setErrors('');
})
.catch((error) => {
console.error(error);
setErrors('Invalid Input');
});
}
function handleChange(e) {
setIdInput(e.target.value);
}
function handleSubmit(e) {
e.preventDefault();
getCountryID();
}