feat: share qr at start

This commit is contained in:
2025-12-10 11:00:09 +01:00
parent 02579b65f9
commit 70ace4cc57
2 changed files with 10 additions and 1 deletions
+8
View File
@@ -1,14 +1,17 @@
import React, { useContext, useEffect, useMemo, useState } from "react";
import { Platform, StyleSheet, View } from "react-native";
import { useGlobal } from "reactn";
import { Portal } from "@gorhom/portal";
import FullscreenIntroVideo from "./FullscreenIntroVideo";
import { useUser } from "../providers/UserDataProvider";
import { SplashAnimationContext } from "../providers/SplashAnimationProvider";
import { musiclandShareUrl } from "../data";
const BLOCKING_TIMEOUT_MS = 5000;
// Affiche la vidéo d'intro mobile (videos.splash) juste après le splash screen.
const MobileSplashVideo = () => {
const [, setShareQrModal] = useGlobal("shareQrModal");
const { videos } = useUser();
const { isFullyLoaded } = useContext(SplashAnimationContext);
@@ -46,6 +49,11 @@ const MobileSplashVideo = () => {
const handleClose = () => {
setVisible(false);
setHasShown(true);
setShareQrModal({
visible: true,
url: musiclandShareUrl,
title: "Scannez le QR-code",
});
};
if (!showBlockingOverlay && !visible) {
+2 -1
View File
@@ -26,7 +26,7 @@ const ShareQrModal = ({
return null;
}
const blurIntensity = Platform.select({ ios: 40, default: 20 });
const blurIntensity = Platform.select({ ios: 40, android: 40, default: 20 });
return (
<Portal>
@@ -42,6 +42,7 @@ const ShareQrModal = ({
intensity={blurIntensity}
tint="dark"
style={styles.modalCard}
experimentalBlurMethod="dimezisBlurView"
>
{/* <Pressable
onPress={onClose}