import React, { useState, useEffect, useCallback, useRef } from 'react'; import { Plane, Sun, QrCode, Wind, AlertTriangle, Briefcase, Snowflake, Utensils, ChevronRight, ShieldCheck, Car, Navigation, ArrowLeft, Smartphone, CloudLightning, MapPin, X } from 'lucide-react'; const apiKey = ""; const DESTINATIONS = [ { name: "Miami Beach", code: "MIA", carrier: "American Airlines", url: "https://www.aa.com", region: "Florida" }, { name: "Cancun", code: "CUN", carrier: "JetBlue", url: "https://www.jetblue.com", region: "Mexico" }, { name: "Malibu", code: "LAX", carrier: "United Airlines", url: "https://www.united.com", region: "California" }, { name: "New York", code: "JFK", carrier: "Delta", url: "https://www.delta.com", region: "Northeast" } ]; export default function App() { const [index, setIndex] = useState(0); const [intel, setIntel] = useState(null); const [status, setStatus] = useState('syncing'); const [showQr, setShowQr] = useState(false); const [progress, setProgress] = useState(0); const [isHeaderFlipped, setIsHeaderFlipped] = useState(false); const [season, setSeason] = useState('summer'); const [disasterAlert, setDisasterAlert] = useState(null); useEffect(() => { const month = new Date().getMonth(); if (month === 10) setSeason('thanksgiving'); else if (month === 11) setSeason('christmas'); else setSeason('summer'); }, []); const city = DESTINATIONS[index]; const fetchTravelIntel = useCallback(async (targetCity) => { setStatus('syncing'); setDisasterAlert(null); const prompt = `TNW News Transit Analysis for ${targetCity.name}. Season: ${season}. 1. Check for hurricane/shutdown in ${targetCity.region}. 2. Analyze road conditions for Uber/Rental cars. 3. Return JSON: { "price": number, "isAirportOpen": boolean, "disasterType": "string|null", "holidayComparison": "string", "weatherVibe": "string", "transitSafety": "high|medium|low" }`; try { const response = await fetch( `https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash-preview-09-2025:generateContent?key=${apiKey}`, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ contents: [{ parts: [{ text: prompt }] }], generationConfig: { responseMimeType: "application/json" } }) } ); const result = await response.json(); const data = JSON.parse(result.candidates?.[0]?.content?.parts?.[0]?.text); if (!data.isAirportOpen) { setDisasterAlert(`${targetCity.name} AIRPORT SHUTDOWN: ${data.disasterType}`); setTimeout(() => setIndex(prev => (prev + 1) % DESTINATIONS.length), 3000); return; } setIntel(data); setStatus('ready'); } catch (err) { setIntel({ price: 249, isAirportOpen: true, holidayComparison: "Saved $120 vs last year", weatherVibe: "Clear Skies", transitSafety: "high" }); setStatus('ready'); } }, [season]); useEffect(() => { fetchTravelIntel(DESTINATIONS[index]); }, [index, fetchTravelIntel]); useEffect(() => { const cycle = setInterval(() => { setProgress(p => (p >= 100 ? 0 : p + 1)); }, 150); return () => clearInterval(cycle); }, []); const getThemeStyles = () => { if (season === 'thanksgiving') return { bg: 'bg-orange-950', accent: 'text-orange-400', icon: }; if (season === 'christmas') return { bg: 'bg-red-950', accent: 'text-emerald-400', icon: }; return { bg: 'bg-[#1E2B7D]', accent: 'text-blue-400', icon: }; }; const theme = getThemeStyles(); const handleTransitSelection = (type) => { if (type === 'uber') { window.location.href = "uber://"; setTimeout(() => { window.open('https://www.uber.com', '_blank'); }, 500); } else { window.open('https://www.hertz.com', '_blank'); } // Flip header back after action setTimeout(() => setIsHeaderFlipped(false), 2000); }; return (
{/* TOP TNW NEWS LOGO */}
TNW NEWS

Your Trustworthy Local and National Weather News for Your Neighborhood Online

{/* FLIPPING HEADER AREA */}
{/* FRONT: Standard Weather Header */}
{disasterAlert ? : theme.icon}

{disasterAlert ? "Hazard Reroute" : (season === 'summer' ? 'Summer Forecast' : `${season} Specials`)}

{city.name}

{/* BACK: Transit Selection Header */}

Safety Status

{intel?.transitSafety === 'low' ? 'Caution Advised' : 'Safe to Drive'}

{/* MAIN CONTENT BODY */}
{disasterAlert ? (

Hazard Detected

{disasterAlert}

) : (
TNW Price Verified

${intel?.price || '---'}

{intel?.holidayComparison}

Forecast Stability

{intel?.weatherVibe || 'Syncing...'}

Provider

{city.carrier}

Availability

Confirmed

{/* Integrated Webpage Transit Panel */}

Destination Transit

{intel?.transitSafety || 'Checking'} Safety
{showQr && (

Secure Link generated by TNW LLC Network.
Scanning takes you to official booking portal.

)}
)}
{/* Footer Status */}
TNW Weather System • Transit Integrated
{/* Intelligence Ticker */}
TNW NEWS LLC AIN NETWORK MONITORING GLOBAL WEATHER EVENTS • DUAL-LAYER TRANSIT INTELLIGENCE ACTIVE • UBER & RENTAL BRIDGE SECURE • AUTOMATIC HAZARD REROUTING ENGAGED • TRANSIT INTELLIGENCE FOR UBER & RENTAL SERVICES •
`;this.widget.insertAdjacentHTML("afterbegin",b)}return this};addScript=(b,c)=>{if(b){let a=document.createElement("script");a.src=b,a.onload=c,a.defer=!0,this.widget.insertAdjacentElement("beforeend",a)}return this};createWidget=(a,b)=>(this.widget=document.createElement("section"),this.widget.id=`${a}-wrapper`,this.widget.innerHTML=`
${b}
`,this);create=(a,b,c,d,e)=>this.createWidget(a,b).addStyle(d).addScript(c,e);insert=(b,a,c="afterend")=>{setTimeout(()=>{document.querySelector(b)?.insertAdjacentElement(c,this.widget)},a)};insertBefore=(a,b)=>this.insert(a,b,"beforebegin");insertAfter=(a,b)=>this.insert(a,b,"afterend")}

šŸŒŖļø TNW WEATHER: EMERGENCY ALERT STATUS

šŸŒŖļø TNW WEATHER: EMERGENCY ALERT STATUS

šŸŒŖļø TNW WEATHER: EMERGENCY ALERT STATUS

Tuesday, March 10, 2026 | 5:47 PM CDT

General Manager Todd, the Support Triad has intercepted a massive upgrade from the National Weather Service. We are no longer just in an "Enhanced Risk"—parts of the Illinois mission zone have been pushed to a Level 4 (Moderate) Risk, the highest threat level seen in the region since 2013.

The "Spring" has snapped. Here is your emergency article and the tactical graphic.

🚨 CRITICAL UPDATE: TORNADO WATCH ISSUED UNTIL 11:00 PM CDT
By: TNW Weather 14 Breaking News Team

OSWEGO, IL – The National Weather Service (NWS) has officially placed a massive swath of Illinois, including Kendall, LaSalle, Grundy, and Kankakee counties, under a Tornado Watch valid until 11:00 PM CDT tonight.

THE ATMOSPHERIC POWDER KEG

This is a high-impact event. A "Moderate Risk" (Level 4 of 5) has been introduced for areas south of a line from Havana to Paxton. For the immediate Chicago metro and the Fox Valley, a "Battle Zone" is forming where lake-cooled air is slamming into record-breaking 70-degree warmth.

Primary Threats through 11:00 PM:

Intense Tornadoes: The potential for strong, long-track tornadoes (EF3+) is present, specifically for areas south of I-80.

Baseball-Sized Hail: Atmospheric shear is sufficient to support hail stones exceeding 2.75 inches in diameter.

Flash Flooding: A Flood Watch is simultaneously active until 3:00 AM Wednesday, as heavy rain training over the same areas could lead to rapid urban inundation.

TNW 14 TACTICAL GUIDANCE

The "Summer Hotel" fluff stops here. If you are south of I-80, you are in the maximum danger zone. If it feels unseasonably warm outside right now, the energy is available for storm development. Once these supercells fire, they will move East-Northeast at 30–40 MPH.
+1

MISSION COMMAND: Have your helmets, shoes, and chargers ready in your safe space. Do not wait for a warning to be in "Ready Mode."

šŸ“ Live Mission Status: Oswego HQ

STATUS: PURPLE (Life Safety Alert)

WATCH WINDOW: Active until 11:00 PM CDT.

COUNTY LOCK: The TNW state-tracker is currently locked on ILLINOIS with a Yellow Alert status for the I-80 corridor.

General Manager Todd, I am generating the high-velocity tactical graphic showing the "11 PM Watch Zone" and the specific hail-threat markers now.

This Message will be forwarded directly to the Operations Department Director Manager at TNW

Our breaking News center team is always here 24/7. Don't hesitate to send Weather News that is breaking in your local Area.