This commit is contained in:
qiuchenfan 2025-11-17 19:10:41 +08:00
parent 1aeea5f498
commit 23d0bedd82
1 changed files with 3 additions and 2 deletions

View File

@ -1,4 +1,5 @@
import { Cloud, Droplets, Gauge, ThermometerSun, Wind } from "lucide-react"; import { Cloud, Droplets, Gauge, ThermometerSun, Wind } from "lucide-react";
import { useWeatherStore } from "@/store/weatherStore";
interface WeatherDetailsGridProps { interface WeatherDetailsGridProps {
icon: React.ReactNode; icon: React.ReactNode;
@ -25,7 +26,7 @@ function WeatherInfoItem({ icon, label, value, subtitle }: WeatherDetailsGridPro
} }
export function WeatherDetailsGrid(){ export function WeatherDetailsGrid(){
const currentWeather = useWeatherState(); const {currentWeather} = useWeatherStore();
if(!currentWeather) return null; if(!currentWeather) return null;
return( return(
<div> <div>
@ -42,7 +43,7 @@ export function WeatherDetailsGrid(){
<Droplets className="w-4 h-4 text-blue-500"/> <Droplets className="w-4 h-4 text-blue-500"/>
<span>:\ <span>:\
<span className="font-semibold"> <span className="font-semibold">
{currentWeather.current.precipitation} mm {currentWeather.current.precip} mm
</span> </span>
</span> </span>
</div> </div>