No matching sightings
Try a different plant name or location keyword.
import { useMemo, useState } from 'react'; import { Gallery } from './components/Gallery.jsx'; import { SightingMap } from './components/SightingMap.jsx'; import { AddSighting } from './components/AddSighting.jsx'; import { SightingDetail } from './components/SightingDetail.jsx'; import { useAuth, useCollection } from '@deplixo/sdk'; // PROGRESS:sc_001:complete:Setting up your nature journal function App() { const { user, loading, logout } = useAuth(); const [activeTab, setActiveTab] = useState('gallery'); const [showAddModal, setShowAddModal] = useState(false); const [selectedSighting, setSelectedSighting] = useState(null); const [searchQuery, setSearchQuery] = useState(''); const collection = useCollection('sightings', { personal: true }); const tabs = [ { id: 'gallery', label: 'Gallery', icon: 'πΏ' }, { id: 'map', label: 'Map', icon: 'πΊοΈ' }, ]; const normalizedQuery = searchQuery.trim().toLowerCase(); const filteredSightings = useMemo(() => { const items = collection.items || []; if (!normalizedQuery) return items; return items.filter(item => { const name = `${item.name || ''} ${item.plantName || ''} ${item.commonName || ''}`.toLowerCase(); const location = `${item.location || ''} ${item.address || ''} ${item.place || ''} ${item.city || ''} ${item.region || ''}`.toLowerCase(); return name.includes(normalizedQuery) || location.includes(normalizedQuery); }); }, [collection.items, normalizedQuery]); const filteredCollection = { ...collection, items: filteredSightings, count: filteredSightings.length, }; const handleSelectSighting = sighting => { setSelectedSighting(sighting); }; if (loading) { return (
Signing you in...
Sign in with Google to keep your sightings and journal entries personal.
e.preventDefault()}> Continue with GoogleGoogle sign-in is handled by Deplixo auth.
Document your botanical discoveries
Try a different plant name or location keyword.