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
@@ -137,7 +137,7 @@ const uploadSourceRecording = async ({ uri, uid, projectId }) => {
const PlaybackDownload = ({ route }) => {
const { currentUID, selectedProject } = useUserData()
const { hasActiveSubscription, videos } = useUser() || {}
const { hasActiveSubscription, hasPurchased, videos } = useUser() || {}
const { createPlaybackDownloadCheckout } = useStripe()
const { action: routeAction, uri, project: routeProject } = route.params || {}
const action = routeAction || 'playback'
@@ -168,7 +168,7 @@ const PlaybackDownload = ({ route }) => {
const playbackDownloadStatus = projectForDownload?.playbackDownloadPurchase?.status || null
const hasPaidPlaybackDownload = playbackDownloadStatus === 'paid'
const canDownloadPlayback = hasActiveSubscription || hasPaidPlaybackDownload
const canDownloadPlayback = hasActiveSubscription || hasPaidPlaybackDownload || hasPurchased
const downloadLabel = canDownloadPlayback
? 'Télécharger le playback'
: 'Acheter le playback pour 1,99€'