From b17d59673726948aeec076bad4d3b3ec915c5120 Mon Sep 17 00:00:00 2001 From: Ross Rosales Date: Fri, 1 Sep 2023 22:11:56 -0500 Subject: [PATCH] Notes to Filter viewed cards --- src/Components/TinderCards.js | 29 ++++++++--------------------- 1 file changed, 8 insertions(+), 21 deletions(-) diff --git a/src/Components/TinderCards.js b/src/Components/TinderCards.js index 28542f1..edffa10 100644 --- a/src/Components/TinderCards.js +++ b/src/Components/TinderCards.js @@ -52,12 +52,10 @@ const useStyles = makeStyles({ position: "right", } }); - +const anime_set = new Set() const anime_map = [] async function getAllAnimeTitleFromDb() { try { - //const usersCollectionRef = collection(firestore, 'users'); - // Create a query to get documents where the age field is greater than the threshold //const q = query(usersCollectionRef, where('animeTitle')); @@ -67,6 +65,8 @@ async function getAllAnimeTitleFromDb() { querySnapshot.forEach(doc => { console.log(doc.data().animeTitle) anime_map.push(doc.data().animeTitle.toString()) + + anime_set.add(doc.data().animeTitle.toString()) }); } catch (error) { @@ -82,28 +82,15 @@ getTopAnime() .then(responseData => { for (var i=0; i