Skip to content

Commit

Permalink
Merge pull request #29 from Plant-for-the-Planet-org/feature/filter-c…
Browse files Browse the repository at this point in the history
…ontrib

filter community contributions
  • Loading branch information
norbertschuler authored Feb 8, 2021
2 parents 6be66b0 + 3420d77 commit 3f51a88
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/TreeMap/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,17 @@
map.on("load", () => {
fetchContributionsData.then((contributions) => {
let filteredContributions;
if (community === "true") {
filteredContributions = contributions;
} else {
filteredContributions = contributions.filter((contrib) => {
return contrib.properties.type !== "gift";
});
}
const geojson = {
type: "FeatureCollection",
features: contributions,
features: filteredContributions,
};
map.addSource("contributions", {
type: "geojson",
Expand Down

1 comment on commit 3f51a88

@vercel
Copy link

@vercel vercel bot commented on 3f51a88 Feb 8, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.