Fix runtime crash: leftover allComments references in MapPage/EventsPage useMemo deps after useCommentCounts rename
Co-authored-by: shakespeare.diy <assistant@shakespeare.diy>
This commit is contained in:
parent
aea66d11e2
commit
be95def874
2 changed files with 3 additions and 3 deletions
|
|
@ -918,7 +918,7 @@ export default function EventsPage() {
|
|||
past.sort((a, b) => sortBy === 'recent' ? b.start - a.start : sortFn(a, b));
|
||||
|
||||
return { upcoming, past };
|
||||
}, [events, searchQuery, locationQuery, selectedTypes, trustFilter, trustScores, sortBy, dateWindow, now, allComments]);
|
||||
}, [events, searchQuery, locationQuery, selectedTypes, trustFilter, trustScores, sortBy, dateWindow, now, commentCounts]);
|
||||
|
||||
// ── Filter tours ──────────────────────────────────────────────────────────────
|
||||
const filteredTours = useMemo(() => {
|
||||
|
|
@ -968,7 +968,7 @@ export default function EventsPage() {
|
|||
});
|
||||
|
||||
return filtered;
|
||||
}, [tours, tourSearchQuery, tourLocationQuery, tourCategory, tourSkillLevel, tourTrustFilter, trustScores, tourSortBy, allComments]);
|
||||
}, [tours, tourSearchQuery, tourLocationQuery, tourCategory, tourSkillLevel, tourTrustFilter, trustScores, tourSortBy, commentCounts]);
|
||||
|
||||
// ── Active filter counts ──────────────────────────────────────────────────────
|
||||
const activeEventFilterCount =
|
||||
|
|
|
|||
|
|
@ -881,7 +881,7 @@ export default function MapPage() {
|
|||
});
|
||||
|
||||
return filtered;
|
||||
}, [allLocations, searchQuery, selectedCategories, weatherEnabled, weatherData, weatherFilter, showSpots, showShops, trustFilter, trustScores, sortBy, userLocation, allComments]);
|
||||
}, [allLocations, searchQuery, selectedCategories, weatherEnabled, weatherData, weatherFilter, showSpots, showShops, trustFilter, trustScores, sortBy, userLocation, commentCounts]);
|
||||
|
||||
// Spots shown as MAP MARKERS. Hide spots the community has confirmed as
|
||||
// "gone" (demolished) so they don't clutter the map — they still appear
|
||||
|
|
|
|||
Loading…
Reference in a new issue