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.start')}
</CustomIconButton>
<Dialog {...bindDialog(popupState)} maxWidth="md" fullWidth scroll="paper">
<TrackManga manga={manga} />
</Dialog>
{popupState.isOpen && (
<Dialog {...bindDialog(popupState)} maxWidth="md" fullWidth scroll="paper">
<TrackManga manga={manga} />
</Dialog>
)}
</>
)}
</PopupState>