Only render the modal when needed
This commit is contained in:
parent
80ecd58b30
commit
325626e46d
2 changed files with 8 additions and 2 deletions
|
@ -116,12 +116,15 @@ export default ({ file }: { file: FileObject }) => {
|
|||
renderToggle={onClick => (
|
||||
<div css={tw`p-3 hover:text-white`} onClick={onClick}>
|
||||
<FontAwesomeIcon icon={faEllipsisH}/>
|
||||
{!!modal &&
|
||||
<RenameFileModal
|
||||
visible
|
||||
appear
|
||||
files={[ file.name ]}
|
||||
visible={!!modal}
|
||||
useMoveTerminology={modal === 'move'}
|
||||
onDismissed={() => setModal(null)}
|
||||
/>
|
||||
}
|
||||
<SpinnerOverlay visible={showSpinner} fixed size={'large'}/>
|
||||
</div>
|
||||
)}
|
||||
|
|
Reference in a new issue