import Image from "next/image"; type Props = { users: { avatar: string | null; firstName: string; lastName: string; count: number; }[]; title: string; }; export const AnalyticsLeaderboard: React.FC = ({ users, title }) => (
{title}
{users.map((user, index) => (
{user && user.avatar && user.avatar !== "" ? (
{user.firstName
) : (
{user.firstName !== "" ? user.firstName[0] : "?"}
)} {user.firstName !== "" ? `${user.firstName} ${user.lastName}` : "No assignee"}
{user.count}
))}
);