/* @component-map * App — Main container, handles view switching between tabs and role toggling * TaskBoard — Task management with add/edit/complete/filter functionality * HouseInfo — House information display and editing * PetCare — Pet profiles with care instructions and photos * PhotoGallery — Photo uploads with captions for house documentation * Toast — Notification toast component * @end-component-map */ import { useIdentity } from '@deplixo/sdk'; import { TaskBoard } from './components/TaskBoard.jsx'; import { HouseInfo } from './components/HouseInfo.jsx'; import { PetCare } from './components/PetCare.jsx'; import { PhotoGallery } from './components/PhotoGallery.jsx'; import { createContext, useCallback, useContext, useState } from 'react'; import { Toast } from './components/Toast.jsx'; export const AppContext = createContext(); export function useAppContext() { return useContext(AppContext); } function App() { const [activeTab, setActiveTab] = useState('tasks'); const [role, setRole] = useState('owner'); const [toast, setToast] = useState(null); const identity = useIdentity(); const showToast = useCallback((message) => { setToast(message); setTimeout(() => setToast(null), 3000); }, []); const toggleRole = () => { setRole(r => r === 'owner' ? 'sitter' : 'owner'); }; const tabs = [ { id: 'tasks', label: '✅ Tasks' }, { id: 'house', label: '🏡 House Info' }, { id: 'pets', label: '🐾 Pets' }, { id: 'photos', label: '📷 Photos' } ]; return (
🏠

HouseSitter Hub

{role === 'owner' ? 'Managing your home' : 'Caring for the home'}

{role === 'owner' ? '🏠 Owner View' : '👤 Sitter View'}
{activeTab === 'tasks' && } {activeTab === 'house' && } {activeTab === 'pets' && } {activeTab === 'photos' && }
); } ReactDOM.createRoot(document.getElementById("root")).render();