Skip to content

Commit

Permalink
swap render order for clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
aswallace committed Dec 4, 2024
1 parent e7664b0 commit 241cd67
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/core/components/Modal/EditMetadata/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ export default function EditMetadata({ onDismiss }: ModalProps) {
body={
// Use styling instead of conditionals to persist rendered data
<>
<EditMetadataForm
className={classNames({ [styles.hidden]: showWarning })}
onDismiss={onDismissWithWarning}
onUnsavedChanges={setHasUnsavedChanges}
/>
<div className={classNames({ [styles.hidden]: !showWarning })}>
<p className={styles.warning}>
Some edits will not be completed and could cause inaccuracies. Are you
Expand All @@ -50,11 +55,6 @@ export default function EditMetadata({ onDismiss }: ModalProps) {
<PrimaryButton title="" text="Yes, Quit" onClick={onDismiss} />
</div>
</div>
<EditMetadataForm
className={classNames({ [styles.hidden]: showWarning })}
onDismiss={onDismissWithWarning}
onUnsavedChanges={setHasUnsavedChanges}
/>
</>
}
onDismiss={onDismissWithWarning}
Expand Down

0 comments on commit 241cd67

Please sign in to comment.