diff --git a/app/components/DualDownloadButton.jsx b/app/components/DualDownloadButton.jsx deleted file mode 100644 index c5edcc4..0000000 --- a/app/components/DualDownloadButton.jsx +++ /dev/null @@ -1,88 +0,0 @@ -import PropTypes from 'prop-types'; -import WedgeToggleButton from './WedgeToggleButton'; - -export default function DualDownloadButton({ - audiobookSelected, - bookSelected, - onDownload, - loading, - userStats, - useAudiobookWedge, - useBookWedge, - onToggleAudiobookWedge, - onToggleBookWedge -}) { - const bothSelected = audiobookSelected && bookSelected; - const disabled = !bothSelected || loading; - const hasWedges = userStats?.flWedges > 0; - - return ( -
-
- {/* Wedge toggles when both selected */} - {bothSelected && hasWedges && ( -
- Use FL Wedge: - - -
- )} - - {/* Download button */} - -
-
- ); -} - -DualDownloadButton.propTypes = { - audiobookSelected: PropTypes.bool.isRequired, - bookSelected: PropTypes.bool.isRequired, - onDownload: PropTypes.func.isRequired, - loading: PropTypes.bool.isRequired, - userStats: PropTypes.shape({ - uploaded: PropTypes.string, - downloaded: PropTypes.string, - ratio: PropTypes.string, - flWedges: PropTypes.number - }), - useAudiobookWedge: PropTypes.bool, - useBookWedge: PropTypes.bool, - onToggleAudiobookWedge: PropTypes.func, - onToggleBookWedge: PropTypes.func -}; diff --git a/app/components/DualSearchResultsList.jsx b/app/components/DualSearchResultsList.jsx index 8e798e1..6802ce3 100644 --- a/app/components/DualSearchResultsList.jsx +++ b/app/components/DualSearchResultsList.jsx @@ -87,6 +87,11 @@ export default function DualSearchResultsList({ } // Download button component - matching search button style with icon + const hasWedges = userStats?.flWedges > 0; + const showBookWedge = hasWedges && selectedBook?.freeleech === false && !selectedBook?.vip && !selectedBook?.snatched; + const showAudiobookWedge = hasWedges && selectedAudiobook?.freeleech === false && !selectedAudiobook?.vip && !selectedAudiobook?.snatched; + const showWedges = showBookWedge || showAudiobookWedge; + const downloadButton = (