Fix users.map crash in NewProjectDialog
Build & Auto-Repair / build (push) Has been cancelled

/api/users returns { users: [...] } but setUsers was receiving
the full wrapper object instead of the inner array.
This commit is contained in:
2026-07-01 11:46:22 +02:00
parent 72f872b2f9
commit c1745df329
+1 -1
View File
@@ -168,7 +168,7 @@ function NewProjectDialog({ statuses, onCreated }: { statuses: ProjectStatus[];
useEffect(() => {
if (!open) return
fetch("/api/customers?limit=100").then(r => r.json()).then(setCustomers).catch(() => {})
fetch("/api/users").then(r => r.json()).then(setUsers).catch(() => {})
fetch("/api/users").then(r => r.json()).then(d => setUsers(d.users || [])).catch(() => {})
}, [open])
const handleSubmit = async () => {