"use client"; import Link from "next/link"; import { ArrowLeft, Heart, ShieldCheck } from "lucide-react"; import { useWeatherStation } from "@/hooks/use-weather-stations"; import { useWeatherStore } from "@/lib/store"; import { formatDateTime } from "@/lib/weather-utils"; import { cn } from "@/lib/utils"; import { Button } from "@/components/ui/button"; import { Card } from "@/components/ui/card"; import { WeatherHero } from "@/components/weather/weather-hero"; import { WeatherDetailsGrid } from "@/components/weather/current-conditions-card"; import { SnapshotChart } from "@/components/charts/snapshot-chart"; import { PageLoadingSkeleton } from "@/components/states/loading-skeleton"; import { ErrorState } from "@/components/states/error-state"; export function StationDetailPage({ id }: { id: string }) { const { data: station, isPending, isError, refetch } = useWeatherStation(id); const favoriteIds = useWeatherStore((state) => state.favorites); const toggleFavorite = useWeatherStore((state) => state.toggleFavorite); if (isPending) return ; if (isError || !station) return refetch()} description="Nie udało się pobrać danych wybranej stacji IMGW." />; const favorite = favoriteIds.includes(station.id); return (
Wszystkie stacje

Stacja {station.name}

Aktualne parametry

Najnowszy pomiar udostępniony przez IMGW. Brakujące wartości są oznaczone bez uzupełniania ich danymi szacunkowymi.

Jakość danych

Ostatni pomiar IMGW

Czas poniżej pochodzi bezpośrednio z najnowszego odczytu udostępnionego przez IMGW.

Ostatni pomiar
{formatDateTime(station.measuredAt)}
Źródło
Publiczne API IMGW
); }