interface TempInfo {
    tempInfo: {
        temp: number;
        feels_like: number;
        temp_min: number;
        temp_max: number;
        pressure: number;
        humidity: number;
        sea_level: number;
        grnd_level: number;
      };
};

export default function Temperature(props: TempInfo) {
    const kelvin = 273.15;
    const tempInfo = props.tempInfo;
    const fullTemp = tempInfo.temp - kelvin;
    const temperature = fullTemp.toFixed(2);
    const fullFeels = tempInfo.feels_like - kelvin;
    const feelsLike = fullFeels.toFixed(2);

    return (
    <p>The temperature right now is {temperature}°C and feels like {feelsLike}°C</p>
    )
}

