Added Notifications
This commit is contained in:
@@ -21,7 +21,7 @@ export function useRegionFlights(
|
||||
})
|
||||
|
||||
const flightsByRegion = computed(() => {
|
||||
return filteredFlights.value.reduce((grouped, flight) => {
|
||||
const grouped = filteredFlights.value.reduce((grouped, flight) => {
|
||||
const dep = flight.departure_airport?.region
|
||||
const arr = flight.arrival_airport?.region
|
||||
|
||||
@@ -37,6 +37,14 @@ export function useRegionFlights(
|
||||
|
||||
return grouped
|
||||
}, {} as Record<string, Flight[]>)
|
||||
|
||||
return Object.fromEntries(
|
||||
Object.entries(grouped).sort(([codeA], [codeB]) => {
|
||||
const nameA = regionNames.value[codeA] ?? codeA
|
||||
const nameB = regionNames.value[codeB] ?? codeB
|
||||
return nameA.localeCompare(nameB)
|
||||
})
|
||||
)
|
||||
})
|
||||
|
||||
const regionNames = computed(() => {
|
||||
|
||||
Reference in New Issue
Block a user