Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 17 additions & 4 deletions packages/web/src/components/track/GiantTrackTile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ import styles from './GiantTrackTile.module.css'
import { GiantTrackTileProgressInfo } from './GiantTrackTileProgressInfo'
import InfoLabel from './InfoLabel'
import { PlayPauseButton } from './PlayPauseButton'
import DownloadButtons from 'components/download-buttons/DownloadButtons'

const { requestOpen: openPublishTrackConfirmationModal } =
publishTrackConfirmationModalUIActions
Expand Down Expand Up @@ -503,12 +504,26 @@ export const GiantTrackTile = ({
</>
)
}

const renderScheduledReleaseRow = () => {
return (
<ScheduledReleaseGiantLabel released={released} isUnlisted={isUnlisted} />
)
}

const renderDownloadButtons = () => {
return (
<DownloadButtons
className={styles.downloadButtonsContainer}
trackId={trackId}
isOwner={isOwner}
following={following}
hasDownloadAccess={hasDownloadAccess}
onDownload={onDownload}
/>
)
}

const isLoading = loading || artworkLoading
// Omitting isOwner and hasStreamAccess so that we always show gated DogEars
const dogEarType = isLoading
Expand Down Expand Up @@ -668,10 +683,7 @@ export const GiantTrackTile = ({
</div>
</div>

{isStreamGated &&
streamConditions &&
isLosslessDownloadsEnabled &&
!hasDownloadableAssets ? (
{isStreamGated && streamConditions ? (
<GatedTrackSection
isLoading={isLoading}
trackId={trackId}
Expand Down Expand Up @@ -715,6 +727,7 @@ export const GiantTrackTile = ({
</UserGeneratedText>
) : null}
{renderTags()}
{!isLosslessDownloadsEnabled ? renderDownloadButtons() : null}
{isLosslessDownloadsEnabled && hasDownloadableAssets ? (
<Box pt='l' w='100%'>
<DownloadSection trackId={trackId} onDownload={onDownload} />
Expand Down