From dc52f57424c5a21eaf7e3062a82834857969df26 Mon Sep 17 00:00:00 2001 From: Adolfo Reyna Date: Mon, 23 Oct 2023 20:08:28 -0400 Subject: [PATCH] Cleaning console.log --- Views/NewPost.js | 2 +- components/PostPopularUsers.js | 14 ++++++++------ components/VideoPlayer.js | 6 +++--- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/Views/NewPost.js b/Views/NewPost.js index 3e7c1f4..e519eb2 100644 --- a/Views/NewPost.js +++ b/Views/NewPost.js @@ -17,7 +17,7 @@ let NewPostView = (props) => { const navigation = useNavigation(); useEffect(() => { - console.log(props) + //console.log(props) let subscribed = true; const getProfileData = async () => { if (!props.route.params?.toProfile) return 0; diff --git a/components/PostPopularUsers.js b/components/PostPopularUsers.js index abec146..3146e6c 100644 --- a/components/PostPopularUsers.js +++ b/components/PostPopularUsers.js @@ -25,12 +25,14 @@ let Post = (props) => { let usersStrings = post.content.match(/@[A-z]+:.+\w/g); let userIds = []; let usersProfileCars = []; - usersStrings.forEach((userString)=>{ - userIds.push(userString.split(':')[1]); - usersProfileCars.push( - - ); - }); + if(usersStrings){ + usersStrings.forEach((userString)=>{ + userIds.push(userString.split(':')[1]); + usersProfileCars.push( + + ); + }); + } let renderPost = (obj) => { return } diff --git a/components/VideoPlayer.js b/components/VideoPlayer.js index 1b14e1b..03915c6 100644 --- a/components/VideoPlayer.js +++ b/components/VideoPlayer.js @@ -20,13 +20,13 @@ const VideoPlayer = ({ videosFiles, postId, profileId, poster, videoUrl, videoSt if (f.rendition === 'adaptive') chosenVideo.push(f); }); if(videoUrl) chosenVideo.push({link: videoUrl}); - console.log(chosenVideo); + //console.log(chosenVideo); setChosenVideo(chosenVideo); }, [videoUrl, postId]); const onLoad = async ()=>{ if(!viewer.data[postId]) return 0; - console.log(postId + " loaded") + //console.log(postId + " loaded") await video.current.setPositionAsync(viewer.data[postId].time*1000); //video.current.isPlaying = true; //video.current.presentFullscreenPlayer(); @@ -43,7 +43,7 @@ const VideoPlayer = ({ videosFiles, postId, profileId, poster, videoUrl, videoSt postId: postId, profileId: profileId, }; - console.log(postId, newData); + //console.log(postId, newData); API.setDataValue(postId, newData); }