/* @component-map * App — Main container, tab navigation [app.jsx] * PetProfiles — Browse pet profiles and manage own profile [components/PetProfiles.jsx] * MapView — Browse nearby pets on an interactive map [components/MapView.jsx] * Playdates — Manage playdate requests sent and received [components/Playdates.jsx] * ProfileModal — Create/edit pet profile modal [components/ProfileModal.jsx] * @end-component-map */ // DEPLOY_CONFIG: {"triggers": [{"name": "playdate-request-created-email", "on": "collection.add", "collection": "playdate_requests", "actions": [{"type": "email", "to": "{{record.other_owner_email}}", "subject": "New playdate request: {{record.pet_name}}", "body": "Hi {{record.other_owner_name}},\n\nA new playdate request has been created for {{record.pet_name}}.\n\nDetails:\n- From: {{record.requester_name}} ({{record.requester_email}})\n- To: {{record.other_owner_name}} ({{record.other_owner_email}})\n- Date/Time: {{record.playdate_datetime}}\n- Location: {{record.location}}\n- Message: {{record.message}}\n\nYou can accept or decline this request from the app.\n\nBest,\nDeplixo"}]}, {"name": "playdate-confirmed-email", "on": "collection.add", "collection": "confirmed_playdates", "actions": [{"type": "email", "to": "{{record.requester_email}}", "subject": "Playdate confirmed: {{record.pet_name}}", "body": "Hi {{record.requester_name}},\n\nGood news \u2014 your playdate has been confirmed for {{record.pet_name}}.\n\nConfirmation details:\n- With: {{record.other_owner_name}} ({{record.other_owner_email}})\n- Date/Time: {{record.playdate_datetime}}\n- Location: {{record.location}}\n- Notes: {{record.message}}\n\nYour playdate is all set. See you then!\n\nBest,\nDeplixo"}, {"type": "email", "to": "{{record.other_owner_email}}", "subject": "Playdate confirmed: {{record.pet_name}}", "body": "Hi {{record.other_owner_name}},\n\nGood news \u2014 your playdate has been confirmed for {{record.pet_name}}.\n\nConfirmation details:\n- With: {{record.requester_name}} ({{record.requester_email}})\n- Date/Time: {{record.playdate_datetime}}\n- Location: {{record.location}}\n- Notes: {{record.message}}\n\nYour playdate is all set. See you then!\n\nBest,\nDeplixo"}]}]} import { useState, useEffect } from 'react'; import { useAuth } from '@deplixo/sdk'; import { PetProfiles } from './components/PetProfiles.jsx'; import { MapView } from './components/MapView.jsx'; import { Playdates } from './components/Playdates.jsx'; // PROGRESS:sc_001:complete:Setting up pet playdate matchmaker function App() { const { user, loading, login, logout } = useAuth(); const [tab, setTab] = useState('profiles'); const [location, setLocation] = useState(null); const [locationStatus, setLocationStatus] = useState('idle'); useEffect(() => { if (!user) { setLocation(null); setLocationStatus('idle'); return; } if (!navigator.geolocation) { setLocationStatus('unsupported'); return; } setLocationStatus('requesting'); navigator.geolocation.getCurrentPosition( (position) => { const coords = { lat: position.coords.latitude, lng: position.coords.longitude, }; setLocation(coords); setLocationStatus('ready'); }, () => { setLocationStatus('denied'); }, { enableHighAccuracy: true, timeout: 10000, maximumAge: 5 * 60 * 1000, } ); }, [user]); if (loading) { return
Sign in with Google to manage your pet profile and plan playdates.
Find the perfect playdate for your pet