feat: share qr at start
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user