diff --git a/src/layouts/Page.js b/src/layouts/Page.js
index de757e2..8eaad34 100644
--- a/src/layouts/Page.js
+++ b/src/layouts/Page.js
@@ -7,13 +7,13 @@ import { responsiveHeight } from "../actions/responsiveSizes.js";
import { icons } from "../assets";
import BaseHeader from "../components/BaseHeader";
import ConnectBtn from "../components/ConnectBtn.js";
+import CoinPackModal from "../components/modal/CoinPackModal";
import NavigateHeader from "../components/NavigateHeader";
import ShareBtn from "../components/ShareBtn/ShareBtn";
import { isWeb } from "../hooks/useLayoutType.js";
import { useUserData } from "../providers/UserDataProvider";
import { gutters } from "../styles";
import { FONT_FAMILY } from "../styles/Fonts";
-import CoinPackModal from "../components/modal/CoinPackModal";
import { subscribeCoinPackModal } from "../utils/coinPackModal";
export default ({
@@ -44,6 +44,7 @@ export default ({
connect = false,
blurIntensity = 0,
backgroundColor = "#000",
+ showCoin = true,
}) => {
const { currentUID = null, currentUserData = null } = useUserData?.() || {};
@@ -82,7 +83,7 @@ export default ({
}
}, [coinBalance]);
- const showCoinBadge = isWeb && !!currentUID;
+ const showCoinBadge = isWeb && !!currentUID && showCoin;
const [isCoinModalVisible, setCoinModalVisible] = React.useState(false);
const handleCoinPress = React.useCallback(() => {
diff --git a/src/screens/HitParade/HitParade.js b/src/screens/HitParade/HitParade.js
index 9f64ad8..565910a 100644
--- a/src/screens/HitParade/HitParade.js
+++ b/src/screens/HitParade/HitParade.js
@@ -219,6 +219,7 @@ const HitParade = () => {
width="100%"
maxWidth={800}
blurIntensity={isWeb ? 0 : 0}
+ showCoin={false}
>
{
currentUID,
});
const { setIsLoading, setTooltip } = useMinuit();
+ const [isAfterPlaybackVideoVisible, setIsAfterPlaybackVideoVisible] =
+ useState(false);
+ const hasShownAfterPlaybackRef = useRef(false);
+
+ const { data: video } = useDataFromRef({
+ ref: videosRef.doc("fr"),
+ simpleRef: true,
+ });
+
+ const afterPlaybackUrl = useMemo(() => {
+ if (!video) return null;
+ if (Platform.OS === "web") {
+ return video?.afterPlaybackWeb || video?.afterPlayback || null;
+ }
+ return video?.afterPlayback || video?.afterPlaybackMobile || null;
+ }, [video]);
+
+ useEffect(() => {
+ if (action !== "playback") return;
+ if (!afterPlaybackUrl) return;
+ if (hasShownAfterPlaybackRef.current) return;
+ hasShownAfterPlaybackRef.current = true;
+ setIsAfterPlaybackVideoVisible(true);
+ }, [action, afterPlaybackUrl]);
const handleDownloadUri = async () => {
if (action === "playback" && project?.id) {
@@ -172,32 +202,33 @@ const DownloadSongs = ({ route }) => {
}
};
return (
-
-
-
-
-
+
+
+
+
-
-
+ >
+
+
+
Prêt à télécharger
{action === "playback" ? " ton Playback" : " ta chanson"} ?
@@ -257,8 +288,16 @@ const DownloadSongs = ({ route }) => {
-
-
+
+
+ {action === "playback" && (
+ setIsAfterPlaybackVideoVisible(false)}
+ />
+ )}
+ >
);
};