/* GreetingHero.jsx — Ordentus midnight hero card. Greeting + live clock + weather + 3-stat strip. The single most recognisable surface in the product. */ function GreetingHero() { const [now, setNow] = React.useState(new Date()); React.useEffect(() => { const id = setInterval(() => setNow(new Date()), 30 * 1000); return () => clearInterval(id); }, []); const hour = now.getHours(); const greeting = hour < 5 ? 'Late night' : hour < 12 ? 'Good morning' : hour < 17 ? 'Good afternoon' : hour < 21 ? 'Good evening' : 'Winding down'; const time12 = now.toLocaleTimeString([], { hour:'numeric', minute:'2-digit' }); const [t, ampm] = time12.split(' '); const dateStr = now.toLocaleDateString([], { weekday:'long', month:'short', day:'numeric' }).toUpperCase(); return (
Today · Wed 13 May

{greeting}, Pete. One page for your day.

You're 2h 15m from CS 240. Cognition reads sharp — memory is the one to watch.

{t}{ampm}
{dateStr}
18° · Light cloud
Cognition
78 / 100
▼ 4 vs 14-day avg
Last night · sleep
6.2h
−1.4h vs target
Next event · in
2h 15m
CS 240 · 9:00 AM
); } window.GreetingHero = GreetingHero;