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