display playbacks
This commit is contained in:
@@ -3,7 +3,7 @@ import { useDataFromRef } from "react-native-minuit/src/hooks";
|
||||
import useMinuit from "react-native-minuit/src/hooks/useMinuit";
|
||||
import { createContext, useContext, useGlobal } from "reactn";
|
||||
|
||||
import { useEffect, useState } from "react";
|
||||
import { useState } from "react";
|
||||
import { checkIfEmailIsValid } from "../actions/signupActions";
|
||||
import firebase, {
|
||||
arrayRemove,
|
||||
@@ -48,6 +48,9 @@ export default ({ children }) => {
|
||||
refreshArray: [currentUID],
|
||||
});
|
||||
|
||||
const userPlaybacks = Array.isArray(userProjects)
|
||||
? userProjects.filter((project) => project.playbackUrl)
|
||||
: [];
|
||||
// Subscribe to user's liked projects
|
||||
const { data: userLikedProjects = [] } = useDataFromRef({
|
||||
ref: currentUID
|
||||
@@ -95,7 +98,7 @@ export default ({ children }) => {
|
||||
followedBy: arrayUnion(currentUID),
|
||||
lastFollowersUpdateAt: new Date(),
|
||||
},
|
||||
{ merge: true },
|
||||
{ merge: true }
|
||||
);
|
||||
setTooltip({ type: "success", text: "Abonnement mis à jour" });
|
||||
}
|
||||
@@ -113,7 +116,7 @@ export default ({ children }) => {
|
||||
followedBy: arrayRemove(currentUID),
|
||||
lastFollowersUpdateAt: new Date(),
|
||||
},
|
||||
{ merge: true },
|
||||
{ merge: true }
|
||||
);
|
||||
setTooltip({
|
||||
type: "success",
|
||||
@@ -242,6 +245,7 @@ export default ({ children }) => {
|
||||
currentUID,
|
||||
currentUserData: currentUserDoc,
|
||||
userProjects,
|
||||
userPlaybacks,
|
||||
userLikedProjects,
|
||||
userPlaylists,
|
||||
followingCount: userFollowing?.length || 0,
|
||||
|
||||
Reference in New Issue
Block a user