From 2bc8415c51b36d86c1a163f602183c199aa8081a Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Thu, 6 Jul 2023 02:41:48 -0700 Subject: [PATCH] Use party prop and add keys We always want to use the party in props until the transformer work is done and our source of truth is more reliable. Also, we are using keys to ensure that the component reloads on new page. --- components/party/EditPartyModal/index.tsx | 1 + components/party/PartyFooter/index.tsx | 11 +++++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/components/party/EditPartyModal/index.tsx b/components/party/EditPartyModal/index.tsx index 3f3def6c..e7ca71ec 100644 --- a/components/party/EditPartyModal/index.tsx +++ b/components/party/EditPartyModal/index.tsx @@ -471,6 +471,7 @@ const EditPartyModal = ({ bound={true} content={description} editable={true} + key={props.party?.shortcode} onUpdate={handleEditorUpdate} /> ) diff --git a/components/party/PartyFooter/index.tsx b/components/party/PartyFooter/index.tsx index 0f1e882d..d149de8b 100644 --- a/components/party/PartyFooter/index.tsx +++ b/components/party/PartyFooter/index.tsx @@ -208,10 +208,13 @@ const PartyFooter = (props: Props) => { const descriptionSection = ( <> - {partySnapshot && - partySnapshot.description && - partySnapshot.description.length > 0 && ( - + {props.party && + props.party.description && + props.party.description.length > 0 && ( + )} {(!partySnapshot || !partySnapshot.description) && (