From f0a22f6a56cf79118c256b492dba5318100800d9 Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Wed, 11 Oct 2023 11:22:52 +0900 Subject: [PATCH] Fix ability for non-owners to change team visibility --- components/party/Party/index.tsx | 2 +- components/party/PartyHeader/index.tsx | 36 ++++++++++++++------------ 2 files changed, 21 insertions(+), 17 deletions(-) diff --git a/components/party/Party/index.tsx b/components/party/Party/index.tsx index 58998e08..eb553641 100644 --- a/components/party/Party/index.tsx +++ b/components/party/Party/index.tsx @@ -143,7 +143,7 @@ const Party = (props: Props) => { // Methods: Updating the party's details async function updateDetails(details: DetailsObject) { if (!props.team) return await createParty(details) - else return await updateParty(details) + else if (party.editable) return await updateParty(details) } function formatDetailsObject(details: DetailsObject) { diff --git a/components/party/PartyHeader/index.tsx b/components/party/PartyHeader/index.tsx index f113ed64..0da39d23 100644 --- a/components/party/PartyHeader/index.tsx +++ b/components/party/PartyHeader/index.tsx @@ -345,13 +345,15 @@ const PartyHeader = (props: Props) => { text={t('party.notices.buttons.copy_link')} onClick={copyToClipboard} /> -