check existing song url before navigating
This commit is contained in:
@@ -4,6 +4,7 @@ import { SheetManager } from "react-native-actions-sheet";
|
||||
import { useGlobal } from "reactn";
|
||||
import MoreMenu from "../../../components/MoreMenu";
|
||||
import { projectsRef } from "../../../config/firebase";
|
||||
import useNavigateToMusicDetails from "../../../hooks/useNavigateToMusicDetails";
|
||||
import { Routes } from "../../../navigation";
|
||||
import { navigate } from "../../../navigation/NavigationService";
|
||||
import { useUser } from "../../../providers/UserDataProvider";
|
||||
@@ -17,6 +18,7 @@ const MyMusic = () => {
|
||||
const projects = Array.isArray(userProjects) ? userProjects.slice(0, 3) : [];
|
||||
|
||||
const [, setTooltip] = useGlobal("_tooltip");
|
||||
const navigateToMusicDetails = useNavigateToMusicDetails();
|
||||
|
||||
return (
|
||||
<CardContainer
|
||||
@@ -39,7 +41,12 @@ const MyMusic = () => {
|
||||
imageUri={p?.coverUrl || null}
|
||||
projectId={p?.id}
|
||||
likedBy={p?.likedBy || []}
|
||||
onPress={() => navigate(Routes.MusicDetails, { projectId: p.id })}
|
||||
onPress={() =>
|
||||
navigateToMusicDetails({
|
||||
projectId: p.id,
|
||||
songUrl: p?.songUrl,
|
||||
})
|
||||
}
|
||||
onPressMore={(posTop) => {
|
||||
setSelectedProjectId(p.id);
|
||||
setMenuPosition(posTop);
|
||||
|
||||
Reference in New Issue
Block a user