// ui import { ProfileEmptyState } from "@/components/ui"; // image import emptyUsers from "public/empty-state/empty_users.svg"; type Props = { users: { avatar: string | null; display_name: string | null; firstName: string; lastName: string; count: number; id: string; }[]; title: string; emptyStateMessage: string; workspaceSlug: string; }; export const AnalyticsLeaderBoard: React.FC = ({ users, title, emptyStateMessage, workspaceSlug }) => (
{title}
{users.length > 0 ? (
{users.map((user) => (
{user && user.avatar && user.avatar !== "" ? (
{user?.display_name
) : (
{user?.display_name !== "" ? user?.display_name?.[0] : "?"}
)} {user?.display_name !== "" ? `${user?.display_name}` : "No assignee"}
{user.count}
))}
) : (
)}
);