SubwayPost is structured as a transit incident reporting and tracking application (likely designed as a mobile-first web app). Upon launching, it attempts to load dynamic application data while displaying a "Fetching live data…" overlay. The app features a bottom/top navigation structure with four main sections:
—)."Please update the SubwayPost web app code to address data loading and interactivity issues.
1. Fallback Data & Error Handling: Implement a `try/catch` wrapper around the initial JSON fetch. If the fetch fails, dismiss the 'Fetching live data…' overlay and automatically load a mock JSON object so the UI (Alerts list, About section metadata, Map pins) populates with sample transit alerts for demonstration.
2. Form Interactivity: Hook up the 'Submit an Incident' form. When a user clicks 'Submit Report', prevent the default submission behavior, validate that the fields aren't empty, inject the new report into the 'Active Alerts' DOM list, and clear the form inputs while showing a 'Report Submitted Successfully' toast message.
3. Theme Toggling: Make the Settings > Appearance toggles functional so that selecting 'Dark' or 'Light' dynamically swaps CSS variables on the document body to change the app's visual theme."