Fix: Position of the "Add" button (#6110)
Fixes https://github.com/calcom/cal.com/issues/6104pull/6111/head
parent
795574ef88
commit
533e208643
|
@ -46,7 +46,25 @@ const MembersView = () => {
|
|||
|
||||
return (
|
||||
<>
|
||||
<Meta title={t("team_members")} description={t("members_team_description")} />
|
||||
<Meta
|
||||
title={t("team_members")}
|
||||
description={t("members_team_description")}
|
||||
CTA={
|
||||
isAdmin ? (
|
||||
<Button
|
||||
type="button"
|
||||
color="primary"
|
||||
StartIcon={Icon.FiPlus}
|
||||
className="ml-auto"
|
||||
onClick={() => setShowMemberInvitationModal(true)}
|
||||
data-testid="new-member-button">
|
||||
{t("add")}
|
||||
</Button>
|
||||
) : (
|
||||
<></>
|
||||
)
|
||||
}
|
||||
/>
|
||||
{!isLoading && (
|
||||
<>
|
||||
<div>
|
||||
|
@ -68,19 +86,6 @@ const MembersView = () => {
|
|||
)}
|
||||
</>
|
||||
)}
|
||||
{isAdmin && (
|
||||
<div className="relative mb-5 flex w-full items-center ">
|
||||
<Button
|
||||
type="button"
|
||||
color="primary"
|
||||
StartIcon={Icon.FiPlus}
|
||||
className="ml-auto"
|
||||
onClick={() => setShowMemberInvitationModal(true)}
|
||||
data-testid="new-member-button">
|
||||
{t("add")}
|
||||
</Button>
|
||||
</div>
|
||||
)}
|
||||
<div>
|
||||
<ul className="divide-y divide-gray-200 rounded-md border ">
|
||||
{team?.members.map((member) => {
|
||||
|
|
|
@ -46,7 +46,7 @@ export default function Meta({ title, description, backButton, CTA }: MetaType)
|
|||
|
||||
/* @TODO: maybe find a way to have this data on first render to prevent flicker */
|
||||
useEffect(() => {
|
||||
if (meta.title !== title || meta.description !== description) {
|
||||
if (meta.title !== title || meta.description !== description || meta.CTA !== CTA) {
|
||||
setMeta({ title, description, backButton, CTA });
|
||||
}
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
|
|
Loading…
Reference in New Issue