feat: remove subscription modale
This commit is contained in:
@@ -5,7 +5,7 @@ import { Portal } from '@gorhom/portal'
|
||||
import FullscreenIntroVideo from './FullscreenIntroVideo'
|
||||
import { useUser } from '../providers/UserDataProvider'
|
||||
import { SplashAnimationContext } from '../providers/SplashAnimationProvider'
|
||||
import { musiclandShareUrl } from '../data'
|
||||
import { musiclandShareHeading, musiclandShareUrl } from '../data'
|
||||
|
||||
const BLOCKING_TIMEOUT_MS = 5000
|
||||
|
||||
@@ -51,7 +51,7 @@ const MobileSplashVideo = () => {
|
||||
setShareQrModal({
|
||||
visible: true,
|
||||
url: musiclandShareUrl,
|
||||
title: 'Scannez le QR-code',
|
||||
title: musiclandShareHeading,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ import { Image } from 'expo-image'
|
||||
import React from 'react'
|
||||
import { Platform, Pressable, Text } from 'react-native'
|
||||
import { icons } from '../assets'
|
||||
import { musiclandShareHeading } from '../data'
|
||||
import { Palette } from '../styles'
|
||||
import { FONT_FAMILY } from '../styles/Fonts'
|
||||
import alert from './Alert'
|
||||
@@ -13,7 +14,7 @@ export default function ShareBtnWeb({ style }) {
|
||||
if (typeof navigator !== 'undefined' && navigator.share) {
|
||||
navigator
|
||||
.share({
|
||||
title: 'MusicLand',
|
||||
title: musiclandShareHeading,
|
||||
text: 'Découvre mon expérience sur MusicLand',
|
||||
...(shareUrl ? { url: shareUrl } : {}),
|
||||
})
|
||||
|
||||
@@ -28,7 +28,7 @@ const ShareModal = ({ payload }) => {
|
||||
const copyUrl = payload?.copyUrl ?? payload?.qrUrl ?? payload?.url ?? musiclandShareUrl
|
||||
const linkLabel = payload?.linkLabel ?? copyUrl
|
||||
const sectionTitle = payload?.sectionTitle ?? 'Partager sur...'
|
||||
const qrTitle = payload?.qrTitle ?? 'Partage Musicland avec tes amis'
|
||||
const qrTitle = payload?.qrTitle ?? musiclandShareHeading
|
||||
const qrUrl = payload?.qrUrl ?? musiclandShareUrl
|
||||
|
||||
const [copied, setCopied] = useState(false)
|
||||
|
||||
@@ -3,11 +3,12 @@ import { BlurView } from 'expo-blur'
|
||||
import React, { useEffect, useMemo } from 'react'
|
||||
import { Platform, Pressable, StyleSheet, Text, View } from 'react-native'
|
||||
|
||||
import { musiclandShareHeading } from '../../data'
|
||||
import { Palette } from '../../styles'
|
||||
import { FONT_FAMILY } from '../../styles/Fonts'
|
||||
import QrCode from '../QrCode'
|
||||
|
||||
const ShareQrModal = ({ visible, onClose, url, title = 'Partage Musicland avec tes amis' }) => {
|
||||
const ShareQrModal = ({ visible, onClose, url, title = musiclandShareHeading }) => {
|
||||
const shareUrl = useMemo(() => url, [url])
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React, { useEffect } from 'react'
|
||||
import { useGlobal } from 'reactn'
|
||||
|
||||
import { musiclandShareUrl } from '../../data'
|
||||
import { musiclandShareHeading, musiclandShareUrl } from '../../data'
|
||||
import ShareQrModal from './ShareQrModal'
|
||||
|
||||
const ShareQrModalContainer = () => {
|
||||
@@ -29,7 +29,7 @@ const ShareQrModalContainer = () => {
|
||||
<ShareQrModal
|
||||
visible={!!visible}
|
||||
url={url || musiclandShareUrl}
|
||||
title={title || 'Partage Musicland avec tes amis'}
|
||||
title={title || musiclandShareHeading}
|
||||
onClose={handleClose}
|
||||
/>
|
||||
)
|
||||
|
||||
+1
-1
@@ -16,6 +16,6 @@ export const algoliaAppUrl = 'https://dashboard.algolia.com/apps'
|
||||
|
||||
export const musiclandProductionBaseUrl = 'https://musicland-one.vercel.app'
|
||||
export const musiclandShareUrl = musiclandProductionBaseUrl
|
||||
export const musiclandShareHeading = 'Partage Musicland avec tes amis'
|
||||
export const musiclandShareHeading = 'Scannez le QR-code'
|
||||
export const musiclandShareMessage =
|
||||
'Invite tes proches a decouvrir MusicLand et cree des experiences musicales ensemble.'
|
||||
|
||||
@@ -651,24 +651,13 @@ const PlaybackDownload = ({ route }) => {
|
||||
<BorderGradientButton
|
||||
title={continueLabel}
|
||||
onPress={() => {
|
||||
if (hasActiveSubscription) {
|
||||
handlePublish()
|
||||
} else {
|
||||
setShowConfirmModal(true)
|
||||
}
|
||||
handlePublish()
|
||||
}}
|
||||
disabled={isPublishing || !hasAcceptedPublication}
|
||||
containerStyle={styles.continueButton}
|
||||
/>
|
||||
</ScrollView>
|
||||
</Page>
|
||||
<SubscriptionConfirmModal
|
||||
continueLabel={'Continuer vers la publication du playback'}
|
||||
isVisible={showConfirmModal}
|
||||
setIsVisible={setShowConfirmModal}
|
||||
onJoinClub={() => navigate(Routes.Payments)}
|
||||
onContinue={handlePublish}
|
||||
/>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -36,6 +36,7 @@ import { toDate } from '../../utils/dateFormatting'
|
||||
import FullscreenIntroVideo from '../../components/FullscreenIntroVideo'
|
||||
import AdventureChoiceModal from './components/AdventureChoiceModal'
|
||||
import ShareAndCreditsModal from './components/ShareAndCreditsModal'
|
||||
import { musiclandShareHeading } from '../../data'
|
||||
|
||||
const SongDownload = ({ route }) => {
|
||||
const {
|
||||
@@ -408,7 +409,7 @@ const SongDownload = ({ route }) => {
|
||||
try {
|
||||
await Sharing.shareAsync(downloadResult.uri, {
|
||||
mimeType: 'audio/mpeg',
|
||||
dialogTitle: 'Enregistrer la musique',
|
||||
dialogTitle: musiclandShareHeading,
|
||||
})
|
||||
} catch (error) {
|
||||
console.log('[SongDownload] share error', error?.message)
|
||||
|
||||
@@ -24,6 +24,7 @@ import { subBadges, icons } from '../../../assets'
|
||||
import { isWeb } from '../../../hooks/useLayoutType'
|
||||
import { navigate } from '../../../navigation/NavigationService'
|
||||
import { Routes } from '../../../navigation'
|
||||
import { musiclandShareHeading } from '../../../data'
|
||||
|
||||
// --- HELPER FUNCTIONS & CONSTANTS (Copied from Subscriptions.js) ---
|
||||
|
||||
@@ -348,7 +349,7 @@ const ShareAndCreditsModal = ({
|
||||
})
|
||||
} else if (platform === 'instagram' || platform === 'tiktok') {
|
||||
if (await Sharing.isAvailableAsync()) {
|
||||
await Sharing.shareAsync(shareUrl, { dialogTitle: 'Partager ma musique' })
|
||||
await Sharing.shareAsync(shareUrl, { dialogTitle: musiclandShareHeading })
|
||||
} else {
|
||||
Linking.openURL(shareUrl)
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ const createShareQrUrl = ({ sharePath = '', fallbackUrl } = {}) => {
|
||||
const defaultPayload = {
|
||||
heading: musiclandShareHeading,
|
||||
url: musiclandShareUrl,
|
||||
shareTitle: 'MusicLand',
|
||||
shareTitle: musiclandShareHeading,
|
||||
shareMessage: musiclandShareMessage,
|
||||
qrUrl: createShareQrUrl({
|
||||
sharePath: '',
|
||||
@@ -116,7 +116,7 @@ export const createMusicSharePayload = ({ projectId, title, artist } = {}) => {
|
||||
|
||||
return {
|
||||
heading: musiclandShareHeading,
|
||||
shareTitle: title ? `${title} - MusicLand` : 'MusicLand',
|
||||
shareTitle: musiclandShareHeading,
|
||||
shareMessage,
|
||||
url: shareUrl,
|
||||
qrUrl,
|
||||
@@ -153,7 +153,7 @@ export const createPlaybackSharePayload = ({ projectId, title, artist, playbackU
|
||||
|
||||
return {
|
||||
heading: musiclandShareHeading,
|
||||
shareTitle: title ? `${title} - MusicLand` : 'MusicLand',
|
||||
shareTitle: musiclandShareHeading,
|
||||
shareMessage,
|
||||
url: shareUrl,
|
||||
qrUrl,
|
||||
@@ -168,6 +168,9 @@ export const openShareSheet = (payload = {}) => {
|
||||
payload: {
|
||||
...defaultPayload,
|
||||
...payload,
|
||||
heading: musiclandShareHeading,
|
||||
shareTitle: musiclandShareHeading,
|
||||
qrTitle: musiclandShareHeading,
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user