Merge branch 'master' of https://codefirst.iut.uca.fr/git/noan.randon/Favor
continuous-integration/drone/push Build encountered an error Details

master
Darius BERTRAND 2 years ago
commit 1729b93e4c

@ -15,12 +15,14 @@ const SuggestFriends = () => {
const stateFriend = () => { const stateFriend = () => {
let array = []; let array = [];
usersData.map((user) => { usersData.map((user) => {
if(user._id !== userData._id && user.followers.includes(userData._id)){ console.log("user",user);
if(user._id !== userData._id && !user.followers.includes(userData._id)){
return array.push(user._id); return array.push(user._id);
} }
}) })
//mettre dans un ordre aléatoire //mettre dans un ordre aléatoire
array.sort(() => 0.5 - Math.random()); array.sort(() => 0.5 - Math.random());
array.length = 5;/*
if(window.innerHeight > 780){ if(window.innerHeight > 780){
array.length = 5; array.length = 5;
} }
@ -37,7 +39,7 @@ const SuggestFriends = () => {
array.length = 1; array.length = 1;
}else { }else {
array.length = 0; array.length = 0;
} }*/
setFriends(array); setFriends(array);
} }

Loading…
Cancel
Save