diff --git a/web/src/components/TorrentCard/index.jsx b/web/src/components/TorrentCard/index.jsx index 4d8471d..8d53e9f 100644 --- a/web/src/components/TorrentCard/index.jsx +++ b/web/src/components/TorrentCard/index.jsx @@ -17,6 +17,7 @@ import ptt from 'parse-torrent-title' import { useTranslation } from 'react-i18next' import AddDialog from 'components/Add/AddDialog' import { StyledDialog } from 'style/CustomMaterialUiStyles' +import useOnStandaloneAppOutsideClick from 'utils/useOnStandaloneAppOutsideClick' import { StyledButton, TorrentCard, TorrentCardButtons, TorrentCardDescription, TorrentCardPoster } from './style' @@ -62,6 +63,8 @@ const Torrent = ({ torrent }) => { const fullPlaylistLink = `${playlistTorrHost()}/${encodeURIComponent(parsedTitle || 'file')}.m3u?link=${hash}&m3u` + const detailedInfoDialogRef = useOnStandaloneAppOutsideClick(closeDetailedInfo) + return ( <> @@ -129,6 +132,7 @@ const Torrent = ({ torrent }) => { fullWidth maxWidth='xl' TransitionComponent={Transition} + ref={detailedInfoDialogRef} >