Add a sun cream tip for hot days (high > 26°C)
Temp-based stand-in for the UV-index idea from earlier -- neither provider is currently fetched for UV, so this reuses the same highTemp value already computed for the jacket tip, just the other direction. Mutually exclusive with jacket (a high can't be both <12 and >26). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
parent
b4f1e81eed
commit
e355d48da4
3 changed files with 10 additions and 3 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import { useEffect, useRef, useState } from 'react'
|
||||
import { CloudOff, Umbrella, Shirt } from 'lucide-react'
|
||||
import { CloudOff, Umbrella, Shirt, Sun } from 'lucide-react'
|
||||
import { fetchForecast, fetchDisplayConfig } from '../api'
|
||||
import { WeatherIcon } from '../lib/icons'
|
||||
import { PointMeta } from '../components/PointMeta'
|
||||
|
|
@ -14,6 +14,7 @@ const TIP_ICONS: Record<TipKey, typeof Umbrella> = {
|
|||
umbrella: Umbrella,
|
||||
'umbrella-soft': Umbrella,
|
||||
jacket: Shirt,
|
||||
sun: Sun,
|
||||
}
|
||||
|
||||
const POLL_MS = 5 * 60 * 1000 // client polls more often than the server's hourly
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ export interface Astro {
|
|||
sunset: string | null
|
||||
}
|
||||
|
||||
export type TipKey = 'umbrella' | 'umbrella-soft' | 'jacket'
|
||||
export type TipKey = 'umbrella' | 'umbrella-soft' | 'jacket' | 'sun'
|
||||
|
||||
export interface Summary {
|
||||
headline: string // "Scattered showers today", "Rain likely later", ...
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue