import Link from "next/link"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { useRouterQuery } from "@calcom/lib/hooks/useRouterQuery"; import { md } from "@calcom/lib/markdownIt"; import { markdownToSafeHTML } from "@calcom/lib/markdownToSafeHTML"; import type { TeamWithMembers } from "@calcom/lib/server/queries/teams"; import { UserAvatar } from "@components/ui/avatar/UserAvatar"; type TeamType = Omit, "inviteToken">; type MembersType = TeamType["members"]; type MemberType = Pick & { safeBio: string | null; orgOrigin: string; }; const Member = ({ member, teamName }: { member: MemberType; teamName: string | null }) => { const routerQuery = useRouterQuery(); const { t } = useLocale(); const isBioEmpty = !member.bio || !member.bio.replace("


", "").length; // We don't want to forward orgSlug and user which are route params to the next route const { slug: _slug, orgSlug: _orgSlug, user: _user, ...queryParamsToForward } = routerQuery; return (

{member.name}

{!isBioEmpty ? ( <>
) : ( t("user_from_team", { user: member.name, team: teamName }) )}
); }; const Members = ({ members, teamName }: { members: MemberType[]; teamName: string | null }) => { if (!members || members.length === 0) { return null; } return (
{members.map((member) => { return member.username !== null && ; })}
); }; const Team = ({ members, teamName }: { members: MemberType[]; teamName: string | null }) => { return (
); }; export default Team;