In this fragment I Have the next error :
Type 'string | null' is not assignable to type 'string'.
Type 'null' is not assignable to type 'string'. TS2322
export async function GetCertainCoinByType(coinId: string) {
const response = await axios.get(URLofCertainCoins + `certain/${coinId}`, {
headers : {
token : localStorage.getItem('token'),
}
});
return response;
}