mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-06-19 13:21:46 +00:00
fix: unrelated changes
This commit is contained in:
@@ -241,7 +241,7 @@ export async function getStats(userId: number) {
|
||||
|
||||
const countries = [...countrySet.values()].map(c => {
|
||||
const countryTrips = trips.filter(t => c.tripIds.has(t.id));
|
||||
const dates = countryTrips.map(t => t.start_date).filter(Boolean).sort((a, b) => a.localeCompare(b));
|
||||
const dates = countryTrips.map(t => t.start_date).filter(Boolean).sort();
|
||||
return {
|
||||
code: c.code,
|
||||
placeCount: c.places.length,
|
||||
@@ -272,7 +272,7 @@ export async function getStats(userId: number) {
|
||||
}
|
||||
}
|
||||
|
||||
const mostVisited = countries.length > 0 ? countries.reduce((a, b) => a.placeCount > b.placeCount ? a : b, countries[0]) : null;
|
||||
const mostVisited = countries.length > 0 ? countries.reduce((a, b) => a.placeCount > b.placeCount ? a : b) : null;
|
||||
|
||||
const continents: Record<string, number> = {};
|
||||
countries.forEach(c => {
|
||||
|
||||
Reference in New Issue
Block a user