1112
This commit is contained in:
parent
1aeea5f498
commit
23d0bedd82
|
|
@ -1,4 +1,5 @@
|
|||
import { Cloud, Droplets, Gauge, ThermometerSun, Wind } from "lucide-react";
|
||||
import { useWeatherStore } from "@/store/weatherStore";
|
||||
|
||||
interface WeatherDetailsGridProps {
|
||||
icon: React.ReactNode;
|
||||
|
|
@ -25,7 +26,7 @@ function WeatherInfoItem({ icon, label, value, subtitle }: WeatherDetailsGridPro
|
|||
}
|
||||
|
||||
export function WeatherDetailsGrid(){
|
||||
const currentWeather = useWeatherState();
|
||||
const {currentWeather} = useWeatherStore();
|
||||
if(!currentWeather) return null;
|
||||
return(
|
||||
<div>
|
||||
|
|
@ -42,7 +43,7 @@ export function WeatherDetailsGrid(){
|
|||
<Droplets className="w-4 h-4 text-blue-500"/>
|
||||
<span>降水量:\
|
||||
<span className="font-semibold">
|
||||
{currentWeather.current.precipitation} mm
|
||||
{currentWeather.current.precip} mm
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue