'Dropdown menu still receiving duplicates from dataset
I'm trying to create a dropdown menu with data from a firestore db but I can't seem to get out the duplicate entries... i tried it with an "in" statement as well a includes() function but they do not remove and they get pushed into the new array. Any help is much appreciated !
useEffect(() => {
const q = query(collection(db, "Location"));
const unsubscribe = onSnapshot(q, (querySnapshot) => {
const locations = [];
const auxLocations = [];
querySnapshot.forEach((doc) => {
if(doc.data().place != '' && (!(doc.data() in locations))){
locations.push(doc.data());
}
});
setLocations(locations);
});
return () => unsubscribe();
}, [])
Solution 1:[1]
Looks like adding devices in the config.toml file for the gitlab-runner solved it. No need for any special settings for the gitlab-runner container.
[runners.docker]
devices = [""]
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Ihor Konovalenko |

