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:
parent
161c256f06
commit
2bc8415c51
2 changed files with 8 additions and 4 deletions
|
|
@ -471,6 +471,7 @@ const EditPartyModal = ({
|
|||
bound={true}
|
||||
content={description}
|
||||
editable={true}
|
||||
key={props.party?.shortcode}
|
||||
onUpdate={handleEditorUpdate}
|
||||
/>
|
||||
)
|
||||
|
|
|
|||
|
|
@ -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}>
|
||||
|
|
|
|||
Loading…
Reference in a new issue