diff --git a/client/src/Components/FavAthlete/Carroussel/Carroussel.js b/client/src/Components/FavAthlete/Carroussel/Carroussel.js index 92ee0bcf..206183bb 100644 --- a/client/src/Components/FavAthlete/Carroussel/Carroussel.js +++ b/client/src/Components/FavAthlete/Carroussel/Carroussel.js @@ -65,7 +65,11 @@ const Carroussel = ({ athletesFollowing, athletesSupportingData }) => { }; const style = { - transform: `translateX(${counter + 60 - userFanAthlete.length * 5}px)`, + transform: `translateX(${ + counter + + 10 - + (athletesFollowing.length + athletesSupportingData.length) * 5 + }px)`, transition: "all .5s ease-in-out", }; const style2 = { @@ -100,6 +104,11 @@ const Carroussel = ({ athletesFollowing, athletesSupportingData }) => { (athletesFollowing.length + athletesSupportingData.length - 1) * 120 ); + athletesFollowing = athletesFollowing.filter((athleteFollowing) => { + return !athletesSupportingData.some((athleteSupporting) => { + return athleteFollowing.athleteId === athleteSupporting.athlete_id; + }); + }); return (
@@ -135,7 +144,7 @@ const Carroussel = ({ athletesFollowing, athletesSupportingData }) => {
diff --git a/client/src/Components/PremiumContentLocked/PremiumContentLocked.js b/client/src/Components/PremiumContentLocked/PremiumContentLocked.js index 9f4b2421..e9c45eca 100644 --- a/client/src/Components/PremiumContentLocked/PremiumContentLocked.js +++ b/client/src/Components/PremiumContentLocked/PremiumContentLocked.js @@ -34,7 +34,6 @@ function PremiumContentLocked({ postCreatorId }) { fetchDisplayName(); }, [postCreatorId]); - console.log(displayName) return (
diff --git a/client/src/Pages/Home/Home.js b/client/src/Pages/Home/Home.js index a3fe9ef3..4a23017d 100644 --- a/client/src/Pages/Home/Home.js +++ b/client/src/Pages/Home/Home.js @@ -304,7 +304,7 @@ function Home({ foundAthletes.push({ athleteId, profile_avatar: userData.profile_avatar, - username: userData.username, + display_name: userData.display_name, }); } }