/* Parent → GPS Watch companion: live location, battery, SOS, safe zones. */ function WatchScreen({ onNav, onBack }) { const child = jlChild(); const [sos, setSos] = React.useState(false); React.useEffect(() => { let t; const read = () => { try { const a = JSON.parse(localStorage.getItem('jl_watch')||'{}'); setSos(!!a.sos); } catch(e){} }; read(); t = setInterval(read, 1500); window.addEventListener('storage', read); return () => { clearInterval(t); window.removeEventListener('storage', read); }; }, []); const places = [ { n:'At school', icon:'school', active:true, time:'since 8:02 AM', tint:'var(--success-100)', ic:'var(--success-500)' }, { n:'Home', icon:'home', active:false, time:'safe zone', tint:'var(--gray-100)', ic:'var(--gray-500)' }, { n:'Grandma\u2019s', icon:'map-pin', active:false, time:'safe zone', tint:'var(--gray-100)', ic:'var(--gray-500)' }, ]; return (
{sos && (
SOS from {child.first}'s watch
Tap to call now
)} {/* live map */}
{[22,44,66,88].map(y=>)} {[20,44,68,90].map(x=>)}
Live · Katy Middle School
{/* status tiles */}
74%
Battery
Strong
Signal
2m
Updated
{/* safe zones */} Safe Zones
{places.map((p,i) => ( {i>0 && }
{p.n}
{p.time}
{p.active && Inside}
))}
Concept: GPS-watch companion. A real device would stream location & SOS to this screen.
); } Object.assign(window, { WatchScreen });