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

Overview

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

{card.title}

{card.value}

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