visiblePointsOfInterest = pointsOfInterest
.filter((val) => {
let filterDate = new Date();
filterDate.setDate(filterDate.getDate() - daysAgo);
return new Date(val.date) >= filterDate;
})
.reduce((acc, val) => {
return [
...acc,
{
...val
}
];
}, [])
.sort((a, b) => a.date > b.date)