diff --git a/components/atoms/UserCard/user-card.tsx b/components/atoms/UserCard/user-card.tsx new file mode 100644 index 0000000000..73f03b4a8e --- /dev/null +++ b/components/atoms/UserCard/user-card.tsx @@ -0,0 +1,58 @@ +import { getAvatarByUsername } from "lib/utils/github"; +import Image from "next/image"; +import React from "react"; + +type MetaObj = { + name: "Followers" | "Following" | "Highlights"; + count: number; +}; +interface UserCardProps { + username: string; + meta: MetaObj[]; + name: string; +} +const UserCard = ({ username, name, meta }: UserCardProps) => { + const avatarUrl = getAvatarByUsername(username); + + return ( +
{`@${username}`}
+{name}
+ {count > 0 ? count : "-"} +Followers
+ {followersCount > 0 ? followersCount : "-"} +Following
+ {followingCount > 0 ? followingCount : "-"} +Highlights
+ {highlightsCount > 0 ? highlightsCount : "-"} +