From 3b8cff73239248735ee223fecab79b7ee6778f34 Mon Sep 17 00:00:00 2001 From: jinsir <874871581@qq.com> Date: Fri, 14 Nov 2025 18:51:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 1114/app/components/weather/WeatherCard.tsx | 10 +++++----- 1114/app/routes/weather.tsx | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/1114/app/components/weather/WeatherCard.tsx b/1114/app/components/weather/WeatherCard.tsx index 732f1d7..1d594f7 100644 --- a/1114/app/components/weather/WeatherCard.tsx +++ b/1114/app/components/weather/WeatherCard.tsx @@ -1,7 +1,7 @@ -import { WeathersearchForm } from "./WeatherSearchForm.tsx"; -import { WeatherDisplay } from "./WeatherDisplay.tsx"; -import { WeatherDetailsGrid } from "./WeatherDetailsGrid.tsx"; -import { useWeatherStore } from "./WeatherStore.tsx"; +import { WeatherSearchForm } from "@/components/weather/WeatherSearchForm.tsx"; +import { WeatherDisplay } from "@/components/weather/WeatherDisplay.tsx"; +import { WeatherDetailsGrid } from "@/components/weather/WeatherDetailsGrid.tsx"; +import { useWeatherStore } from "@/store/weatherStore.tsx"; import Cloud from "../../../assets/cloud.svg"; export function WeatherCard() { @@ -9,7 +9,7 @@ export function WeatherCard() { return (
- + {currentWeather ? (
diff --git a/1114/app/routes/weather.tsx b/1114/app/routes/weather.tsx index 9a3823f..0592099 100644 --- a/1114/app/routes/weather.tsx +++ b/1114/app/routes/weather.tsx @@ -1,7 +1,7 @@ import REACT, { use, useEffect } from 'react' import { Loader2 } from 'lucide-react'; -import { WeatherCard } from './WeatherCard' -import { useWeatherstore } from './WeatherStore' +import { WeatherCard } from '@/components/weather/WeatherCard' +import { useWeatherStore } from '@/store/weatherStore' import { toast } from 'sonner' @@ -15,13 +15,13 @@ export function meta() { } export default function Weather() { - const { currentWeather, isLoading, error, seterror } = useWeatherstore() + const { currentWeather, isLoading, error, setError } = useWeatherStore() useEffect(() => { if (error) { toast.error(error) - seterror("") + setError("") } - }, [error, seterror]) + }, [error, setError]) return (