Render "manga track dialog" only when opened

This commit is contained in:
schroda
2025-01-12 20:27:10 +01:00
parent ba52e70dbb
commit 7ed345cf87

View File

@@ -63,9 +63,11 @@ export const TrackMangaButton = ({ manga }: { manga: MangaTrackRecordInfo & Pick
? t('manga.button.track.active', { count: trackersInUse.length }) ? t('manga.button.track.active', { count: trackersInUse.length })
: t('manga.button.track.start')} : t('manga.button.track.start')}
</CustomIconButton> </CustomIconButton>
<Dialog {...bindDialog(popupState)} maxWidth="md" fullWidth scroll="paper"> {popupState.isOpen && (
<TrackManga manga={manga} /> <Dialog {...bindDialog(popupState)} maxWidth="md" fullWidth scroll="paper">
</Dialog> <TrackManga manga={manga} />
</Dialog>
)}
</> </>
)} )}
</PopupState> </PopupState>