clear last tickets
This commit is contained in:
@@ -5,6 +5,7 @@ import MusicLandHeader from "../../components/MusicLandHeader";
|
||||
import GradientButton from "../../components/GradientButton";
|
||||
import { background, img } from "../../assets";
|
||||
import { goBack, navigate } from "../../navigation/NavigationService";
|
||||
import useMinuit from "react-native-minuit/src/hooks/useMinuit.js";
|
||||
import CreateLyricsHeader from "../Writing/components/CreateLyricsHeader";
|
||||
import { responsiveHeight } from "react-native-responsive-dimensions";
|
||||
import { size } from "../../styles/Style";
|
||||
@@ -20,6 +21,7 @@ const StreamSong = () => {
|
||||
const project = params?.project || null;
|
||||
const { hasActiveSubscription } = useUser() || {};
|
||||
const userHasActiveSubscription = hasActiveSubscription;
|
||||
const { setTooltip } = useMinuit();
|
||||
|
||||
useEffect(() => {
|
||||
if (action && action !== "playback") {
|
||||
@@ -36,11 +38,19 @@ const StreamSong = () => {
|
||||
: "Rejoindre le Club MusicLand";
|
||||
const handlePrimaryAction = useCallback(() => {
|
||||
if (userHasActiveSubscription) {
|
||||
if (action === "playback") {
|
||||
setTooltip({
|
||||
type: "success",
|
||||
text: "Playback publié !",
|
||||
});
|
||||
navigate(Routes.Home);
|
||||
return;
|
||||
}
|
||||
navigate(Routes.SongRelease, { action });
|
||||
return;
|
||||
}
|
||||
navigate(Routes.Payments);
|
||||
}, [action, userHasActiveSubscription]);
|
||||
}, [action, setTooltip, userHasActiveSubscription]);
|
||||
|
||||
return (
|
||||
<Page
|
||||
|
||||
Reference in New Issue
Block a user