import Link from "next/link"; import { useRouter } from "next/router"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { md } from "@calcom/lib/markdownIt"; import { markdownToSafeHTML } from "@calcom/lib/markdownToSafeHTML"; import type { TeamWithMembers } from "@calcom/lib/server/queries/teams"; import { Avatar } from "@calcom/ui"; type TeamType = NonNullable; type MembersType = TeamType["members"]; type MemberType = MembersType[number] & { safeBio: string | null }; type TeamTypeWithSafeHtml = Omit & { members: MemberType[] }; const Member = ({ member, teamName }: { member: MemberType; teamName: string | null }) => { const { t } = useLocale(); const router = useRouter(); const isBioEmpty = !member.bio || !member.bio.replace("


", "").length; // slug is a route parameter, we don't want to forward it to the next route const { slug: _slug, ...queryParamsToForward } = router.query; 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 = ({ team }: { team: TeamTypeWithSafeHtml }) => { return (
); }; export default Team;