empty liked musique
This commit is contained in:
@@ -38,7 +38,10 @@ export default ({ children }) => {
|
||||
});
|
||||
|
||||
// Subscribe to user's projects (musics)
|
||||
const { data: userProjects = [] } = useDataFromRef({
|
||||
const {
|
||||
data: userProjects = [],
|
||||
loading: userProjectsLoading = true,
|
||||
} = useDataFromRef({
|
||||
ref: currentUID
|
||||
? projectsRef
|
||||
.where("userId", "==", currentUID)
|
||||
@@ -54,7 +57,10 @@ export default ({ children }) => {
|
||||
? userProjects.filter((project) => project.playbackUrl)
|
||||
: [];
|
||||
// Subscribe to user's liked projects
|
||||
const { data: userLikedProjects = [] } = useDataFromRef({
|
||||
const {
|
||||
data: userLikedProjects = [],
|
||||
loading: userLikedProjectsLoading = true,
|
||||
} = useDataFromRef({
|
||||
ref: currentUID
|
||||
? projectsRef
|
||||
.where("likedBy", "array-contains", currentUID)
|
||||
@@ -394,9 +400,13 @@ export default ({ children }) => {
|
||||
currentUID,
|
||||
currentUserData: currentUserDoc,
|
||||
userProjects,
|
||||
userProjectsLoading,
|
||||
userPlaybacks,
|
||||
userPlaybacksLoading: userProjectsLoading,
|
||||
userLikedProjects,
|
||||
userLikedProjectsLoading,
|
||||
userLikedPlaybacks,
|
||||
userLikedPlaybacksLoading: userLikedProjectsLoading,
|
||||
userPlaylists,
|
||||
selectedProjectId,
|
||||
selectedProject,
|
||||
|
||||
Reference in New Issue
Block a user