download allowed if purchase

This commit is contained in:
2026-02-25 12:06:08 +01:00
parent 6d50d18d56
commit 73651a8716
4 changed files with 31 additions and 4 deletions
+2 -2
View File
@@ -43,7 +43,7 @@ const SongDownload = ({ route }) => {
skipAdventureGate = false,
promptPurchaseConfirm = false,
} = route?.params || {}
const { selectedProject, updateProjectData, hasActiveSubscription } = useUser()
const { selectedProject, updateProjectData, hasActiveSubscription, hasPurchased } = useUser()
const { createSongDownloadCheckout } = useStripe()
const { setTooltip } = useMinuit()
const { setLoading } = useGlobalLoading()
@@ -104,7 +104,7 @@ const SongDownload = ({ route }) => {
const projectId = projectForStage?.id || null
const downloadPurchaseStatus = projectForStage?.downloadPurchase?.status || null
const hasPaidDownload = downloadPurchaseStatus === 'paid'
const canDownloadDirectly = hasActiveSubscription || hasPaidDownload
const canDownloadDirectly = hasActiveSubscription || hasPaidDownload || hasPurchased
const downloadLabel = canDownloadDirectly
? 'Télécharger mon morceau'
: 'Acheter ce morceau pour 1,99€'