feat(ux): adopt shared Empty primitive across all empty states

- one Empty/EmptyHeader/EmptyMedia/EmptyTitle/EmptyDescription
  component replaces ~18 ad-hoc empty states
- projects gains a real empty state (was four bare columns) with a
  create CTA wired to the existing handler
- governance/ops/customize/comms/comments empty states unified;
  existing CTAs and conditions preserved (presentational only)
This commit is contained in:
Moheeb Zara
2026-05-15 22:12:52 -07:00
parent 92ba6fb390
commit f885ac73d3
19 changed files with 297 additions and 93 deletions
+10 -3
View File
@@ -1,7 +1,8 @@
'use client'
import { useState } from 'react'
import { Plus, X, ChevronDown } from 'lucide-react'
import { Plus, X, ChevronDown, Users } from 'lucide-react'
import { Empty, EmptyHeader, EmptyMedia, EmptyTitle, EmptyDescription } from '@/components/ui/empty'
import { addMember, updateMember, approveMember, removeMember, assignAreaLead } from '@/lib/actions'
import { toast } from 'sonner'
import { useRouter } from 'next/navigation'
@@ -362,8 +363,14 @@ export function MembersClient({ members: initialMembers, currentRole, areaLeadRo
)
}) : (
<tr>
<td colSpan={isAdmin(currentRole) ? 6 : 5} className="px-4 py-12 text-center font-sans text-sm text-muted-foreground">
No members match this filter
<td colSpan={isAdmin(currentRole) ? 6 : 5} className="p-0">
<Empty className="border-0">
<EmptyHeader>
<EmptyMedia variant="icon"><Users /></EmptyMedia>
<EmptyTitle>No members match this filter</EmptyTitle>
<EmptyDescription>Try a different tab, clear the search, or change the tier filter.</EmptyDescription>
</EmptyHeader>
</Empty>
</td>
</tr>
)}