type Props = { users: { avatar: string | null; email: string | null; firstName: string; lastName: string; count: number; }[]; title: string; }; export const AnalyticsLeaderboard: React.FC = ({ users, title }) => (
{title}
{users.length > 0 ? (
{users.map((user) => (
{user && user.avatar && user.avatar !== "" ? (
{user.email
) : (
{user.firstName !== "" ? user.firstName[0] : "?"}
)} {user.firstName !== "" ? `${user.firstName} ${user.lastName}` : "No assignee"}
{user.count}
))}
) : (
No matching data found.
)}
);