/* @component-map * App — Main container, layout shell [app.jsx] * DealList — Shows all deals sorted by expiration, flags expired [components/DealList.jsx] * AddDeal — Form to add new deals [components/AddDeal.jsx] * StatsBar — Summary stats (active deals, expiring soon, expired) [components/StatsBar.jsx] * @end-component-map */ // DEPLOY_CONFIG: {"cron": [{"name": "daily_expiring_deals_reminder", "schedule": "0 9 * * *", "action": "event", "config": {"event_type": "daily_expiring_deals_reminder"}}], "triggers": [{"name": "watched_category_deal_added_email", "on": "collection.add", "collection": "deals", "actions": [{"type": "email", "to": "category_watchers", "subject": "New deal added in a category you watch", "body": "A new deal was added in one of your watched categories. Check it out in the app for more details."}]}]} import { useState } from 'react'; import { StatsBar } from './components/StatsBar.jsx'; import { DealList } from './components/DealList.jsx'; import { AddDeal } from './components/AddDeal.jsx'; import { useAuth, useCollection } from '@deplixo/sdk'; // PROGRESS:sc_001:complete:Setting up your deal tracker function App() { const { user, loading: authLoading, login, logout } = useAuth(); const [showAddModal, setShowAddModal] = useState(false); const collection = useCollection('deals', { personal: true }); if (authLoading) { return (
🏷️

DealVault

Signing you in...

); } if (!user) { return (
🏷️

DealVault

Sign in with Google to access your personal deal list.

); } return (
🏷️

DealVault

Your coupon & deal tracker

Welcome, {user.name}

Your Deals

{showAddModal && ( setShowAddModal(false)} onAdd={collection.add} /> )}
); } ReactDOM.createRoot(document.getElementById("root")).render();