fix: team page data (#11382)
parent
6e3a1369f8
commit
a2873c740b
|
@ -9,7 +9,7 @@ import { Avatar } from "@calcom/ui";
|
|||
|
||||
type TeamType = Omit<NonNullable<TeamWithMembers>, "inviteToken">;
|
||||
type MembersType = TeamType["members"];
|
||||
type MemberType = MembersType[number] & { safeBio: string | null };
|
||||
type MemberType = Pick<MembersType[number], "id" | "name" | "bio" | "username"> & { safeBio: string | null };
|
||||
type TeamTypeWithSafeHtml = Omit<TeamType, "members" | "inviteToken"> & { members: MemberType[] };
|
||||
|
||||
const Member = ({ member, teamName }: { member: MemberType; teamName: string | null }) => {
|
||||
|
|
|
@ -312,7 +312,13 @@ export const getServerSideProps = async (context: GetServerSidePropsContext) =>
|
|||
const safeBio = markdownToSafeHTML(team.bio) || "";
|
||||
|
||||
const members = team.members.map((member) => {
|
||||
return { ...member, safeBio: markdownToSafeHTML(member.bio || "") };
|
||||
return {
|
||||
name: member.name,
|
||||
id: member.id,
|
||||
bio: member.bio,
|
||||
username: member.username,
|
||||
safeBio: markdownToSafeHTML(member.bio || ""),
|
||||
};
|
||||
});
|
||||
|
||||
const markdownStrippedBio = stripMarkdown(team?.bio || "");
|
||||
|
|
Loading…
Reference in New Issue