From 9134ad8c5e135a87f876b6db88704487306de58b Mon Sep 17 00:00:00 2001 From: Jeroen Reumkens Date: Thu, 29 Sep 2022 18:34:01 +0200 Subject: [PATCH] Improved team layout when blocks have unequal content length. (#4763) * Improved team layout when blocks have unequal content length. * Removed unused translation in members component. Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> --- apps/web/components/team/screens/Team.tsx | 71 +++++++++++------------ 1 file changed, 34 insertions(+), 37 deletions(-) diff --git a/apps/web/components/team/screens/Team.tsx b/apps/web/components/team/screens/Team.tsx index d59a75b1d1..f73905609a 100644 --- a/apps/web/components/team/screens/Team.tsx +++ b/apps/web/components/team/screens/Team.tsx @@ -1,10 +1,7 @@ import Link from "next/link"; import { TeamPageProps } from "pages/team/[slug]"; -import React from "react"; import { WEBAPP_URL } from "@calcom/lib/constants"; -import Button from "@calcom/ui/Button"; -import { Icon } from "@calcom/ui/Icon"; import { Avatar } from "@calcom/ui/v2"; import { useLocale } from "@lib/hooks/useLocale"; @@ -13,46 +10,46 @@ type TeamType = TeamPageProps["team"]; type MembersType = TeamType["members"]; type MemberType = MembersType[number]; -const Team = ({ team }: TeamPageProps) => { +const Member = ({ member, teamName }: { member: MemberType; teamName: string | null }) => { const { t } = useLocale(); - const Member = ({ member }: { member: MemberType }) => { - return ( - -
- -
-

{member.name}

-

- {member.bio || t("user_from_team", { user: member.name, team: team.name })} -

-
-
- - ); - }; + return ( + +
+ +
+

{member.name}

+

+ {member.bio || t("user_from_team", { user: member.name, team: teamName })} +

+
+
+ + ); +}; - const Members = ({ members }: { members: MembersType }) => { - if (!members || members.length === 0) { - return null; - } - - return ( -
- {members.map((member) => { - return member.username !== null && ; - })} -
- ); - }; +const Members = ({ members, teamName }: { members: MembersType; teamName: string | null }) => { + if (!members || members.length === 0) { + return null; + } + return ( +
+ {members.map((member) => { + return member.username !== null && ; + })} +
+ ); +}; + +const Team = ({ team }: TeamPageProps) => { return (
- +
); };