Fix conditional rendering in ModalStack component

This commit is contained in:
Huderon 2024-03-28 20:30:02 +11:00
parent 78edeb77c6
commit b63e7981ef
1 changed files with 1 additions and 1 deletions

View File

@ -71,6 +71,6 @@ export default function ModalStack() {
return <TransitionGroup component={Fragment}>
<Backdrop isVisible={!!modals.length} onClick={() => removeModal(modals[modals.length - 1].modalKey)} />
{modals.length && <ModalLayer key={modals[modals.length - 1].modalKey} {...modals[modals.length - 1]} onClose={() => removeModal(modals[modals.length - 1].modalKey)} />}
{!!modals.length && <ModalLayer key={modals[modals.length - 1].modalKey} {...modals[modals.length - 1]} onClose={() => removeModal(modals[modals.length - 1].modalKey)} />}
</TransitionGroup>;
}