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.
This commit is contained in:
Justin Edmund 2023-07-06 02:41:48 -07:00
parent 161c256f06
commit 2bc8415c51
2 changed files with 8 additions and 4 deletions

View file

@ -471,6 +471,7 @@ const EditPartyModal = ({
bound={true}
content={description}
editable={true}
key={props.party?.shortcode}
onUpdate={handleEditorUpdate}
/>
)

View file

@ -208,10 +208,13 @@ const PartyFooter = (props: Props) => {
const descriptionSection = (
<>
{partySnapshot &&
partySnapshot.description &&
partySnapshot.description.length > 0 && (
<Editor content={appState.party.description} />
{props.party &&
props.party.description &&
props.party.description.length > 0 && (
<Editor
content={props.party.description}
key={props.party?.shortcode}
/>
)}
{(!partySnapshot || !partySnapshot.description) && (
<section className={styles.noDescription}>