import { useRouter } from "next/router"; import Link from "next/link"; // ui import { Icon, Loader } from "components/ui"; // types import { IUserProfileData } from "types"; type Props = { userProfile: IUserProfileData | undefined; }; export const ProfileStats: React.FC = ({ userProfile }) => { const router = useRouter(); const { workspaceSlug, userId } = router.query; const overviewCards = [ { icon: "new_window", route: "created", title: "Issues created", value: userProfile?.created_issues ?? "...", }, { icon: "account_circle", route: "assigned", title: "Issues assigned", value: userProfile?.assigned_issues ?? "...", }, { icon: "subscriptions", route: "subscribed", title: "Issues subscribed", value: userProfile?.subscribed_issues ?? "...", }, ]; return (

Overview

{userProfile ? (
{overviewCards.map((card) => (

{card.title}

{card.value}

))}
) : ( )}
); };