/* @component-map * App — Main container, layout shell [app.jsx] * WeatherDashboard — Current conditions + forecast display [components/WeatherDashboard.jsx] * SearchBar — City search with geocoding [components/SearchBar.jsx] * CurrentWeather — Current conditions card with animated icon [components/CurrentWeather.jsx] * ForecastCard — Individual forecast day card [components/ForecastCard.jsx] * WeatherIcon — Animated SVG weather icon [components/WeatherIcon.jsx] * @end-component-map */ // DEPLOY_CONFIG: {"cron": [{"name": "daily_weather_forecast_email", "schedule": "0 7 * * *", "action": "event", "config": {"event_type": "fetch_daily_weather_and_email_forecast"}}], "triggers": [{"name": "severe_weather_alert", "on": "collection.add", "collection": "weather_alerts", "actions": [{"type": "email", "to": "subscribed_users", "subject": "Severe Weather Alert", "body": "Severe weather conditions have been detected. Please check the dashboard for immediate updates."}]}, {"name": "dashboard_share_invite", "on": "collection.add", "collection": "dashboard_shares", "actions": [{"type": "email", "to": "share_recipient", "subject": "Dashboard Access Shared With You", "body": "A dashboard link has been shared with you. Use the provided secure URL and permissions to access it."}]}]} import { useState, useEffect } from 'react'; import { WeatherDashboard } from './components/WeatherDashboard.jsx'; function App() { useEffect(() => { document.title = "Keyton's Weather Page"; }, []); return (

Keyton's Weather Page

Real-time conditions & forecast

); } export function createShareableDashboardUrl({ baseUrl, dashboardId, accessToken }) { const url = new URL(`/dashboard/${encodeURIComponent(dashboardId)}`, baseUrl); if (accessToken) url.searchParams.set('access_token', accessToken); return url.toString(); } export async function fetchSharePermissions(dashboardId) { const res = await fetch(`/api/dashboards/${encodeURIComponent(dashboardId)}/share-permissions`, { credentials: 'include' }); if (!res.ok) throw new Error('Failed to load share permissions'); return res.json(); } export async function createDashboardShare(dashboardId, permissions) { const res = await fetch(`/api/dashboards/${encodeURIComponent(dashboardId)}/shares`, { method: 'POST', headers: { 'Content-Type': 'application/json' }, credentials: 'include', body: JSON.stringify({ permissions }) }); if (!res.ok) throw new Error('Failed to create dashboard share'); return res.json(); } ReactDOM.createRoot(document.getElementById("root")).render();