import { FC } from "react"; import { IIssue, IProject } from "types"; export interface WorkspaceHomeCardsListProps { groupedIssues: any; myIssues: IIssue[]; projects: IProject[]; } export const WorkspaceHomeCardsList: FC = (props) => { const { groupedIssues, myIssues, projects } = props; const cards = [ { title: "Issues completed", number: groupedIssues.completed.length, }, { title: "Issues pending", number: myIssues?.length ?? 0 - groupedIssues.completed.length, }, { title: "Projects", number: projects?.length ?? 0, }, ]; return (
{cards.map((card, index) => (

{card.title}

{card.number}

))}
); };