import type { PersonalData } from '@/types' /** * Builds a uuid → display-name lookup from a workspace's members. * * Falls back to returning the uuid itself when no member matches — callers * that need a friendlier fallback (e.g. while members are still loading) * should detect that case themselves rather than this helper guessing. * * Shared by `PlanResults.tsx` and `Dashboard.tsx` — keep behaviour identical * for both call sites. */ export function nameResolver(members: PersonalData[]): (uuid: string) => string { return (uuid: string) => members.find((m) => m.uuid === uuid)?.name ?? uuid }