1112
This commit is contained in:
parent
1aeea5f498
commit
23d0bedd82
|
|
@ -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>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue