Normalize Wunderground labels to METAR

This commit is contained in:
2569718930@qq.com
2026-04-22 23:43:27 +08:00
parent e3a9f7fb00
commit fe804bc915
8 changed files with 81 additions and 34 deletions
+5 -1
View File
@@ -1,4 +1,5 @@
import type { CityDetail } from "@/lib/dashboard-types";
import { normalizeObservationSourceLabel } from "@/lib/source-labels";
export type OfficialSourceLink = {
label: string;
@@ -749,7 +750,10 @@ export function getOfficialSourceLinks(detail: CityDetail): OfficialSourceLink[]
}),
};
}
return link;
return {
...link,
label: normalizeObservationSourceLabel(link.label, link.label),
};
});
const seen = new Set<string>();
return links.filter((link) => {