diff --git a/app/(app)/leads/index.tsx b/app/(app)/leads/index.tsx
index 813147a..a9a1ac3 100644
--- a/app/(app)/leads/index.tsx
+++ b/app/(app)/leads/index.tsx
@@ -22,10 +22,11 @@ export default function LeadsScreen() {
const qc = useQueryClient();
const [search, setSearch] = useState('');
const [showAdd, setShowAdd] = useState(false);
- const [newName, setNewName] = useState('');
- const [newPhone, setNewPhone] = useState('');
- const [newNotes, setNewNotes] = useState('');
- const [saving, setSaving] = useState(false);
+ const [newName, setNewName] = useState('');
+ const [newPhone, setNewPhone] = useState('');
+ const [newAddress, setNewAddress] = useState('');
+ const [newNotes, setNewNotes] = useState('');
+ const [saving, setSaving] = useState(false);
const { data, isLoading, refetch, isRefetching } = useQuery({
queryKey: ['leads'],
@@ -47,10 +48,11 @@ export default function LeadsScreen() {
await api.post('/api/v1/leads', {
firstName, lastName,
phone: newPhone.trim(),
- ...(newNotes.trim() ? { notes: newNotes.trim() } : {}),
+ ...(newAddress.trim() ? { address: newAddress.trim() } : {}),
+ ...(newNotes.trim() ? { notes: newNotes.trim() } : {}),
});
setShowAdd(false);
- setNewName(''); setNewPhone(''); setNewNotes('');
+ setNewName(''); setNewPhone(''); setNewAddress(''); setNewNotes('');
qc.invalidateQueries({ queryKey: ['leads'] });
refetch();
} catch (e: any) {
@@ -169,6 +171,13 @@ export default function LeadsScreen() {
style={{ borderWidth: 1.5, borderColor: '#E2E8F0', borderRadius: 12, paddingHorizontal: 14, paddingVertical: 13, fontSize: 16, color: '#1E293B', marginBottom: 14 }}
/>
+ Address (optional)
+
+
Notes (optional)