From c1745df3290765b9ff8bde25b63984d4665a240c Mon Sep 17 00:00:00 2001 From: Rene Date: Wed, 1 Jul 2026 11:46:22 +0200 Subject: [PATCH] Fix users.map crash in NewProjectDialog /api/users returns { users: [...] } but setUsers was receiving the full wrapper object instead of the inner array. --- src/app/(dashboard)/projects/page.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/(dashboard)/projects/page.tsx b/src/app/(dashboard)/projects/page.tsx index f409c84..e08629c 100644 --- a/src/app/(dashboard)/projects/page.tsx +++ b/src/app/(dashboard)/projects/page.tsx @@ -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 () => {