import { Droplets,Wind,Gauge,Cloud,Eye,ThermometerSun} from "lucide-react"; import React from "react"; import { getWindDirection } from "@/lib/utils"; import {useWeatherStore} from "@/store/weatherStore"; interface WeatherInfoItemProps { icon: React.ReactNode; label: string; value: string; subtitle?: string; } function WeatherInfoItem({ icon, label, value, subtitle }: WeatherInfoItemProps) { return (
{icon}

{label}

{value}

{subtitle &&

{subtitle}

}
); } export function WeatherDetailsGrid() { <>
} label="湿度" value={'${currentWeather.current.humidity}%'}/> } label="风速" value={'${currentWeather.current.wind_speed}%'} subtitle={getWindDirection(currentWeather.current.wind_dir)}/> } label="气压" value={'${currentWeather.current.humidity}%'}/> } label="云量" value={'${currentWeather.current.cloudcover}%'}/> } label="紫外线" value={'${currentWeather.current.uv_index}%'}/>
降水量:{currentWeather.current.precip}mm
{currentWeather.current.is_day==="yes"?'白天':'夜晚'}

观测时间:{currentWeather.current.observation_time}

}