Skip to content

Commit

Permalink
Filter cancelled weather warning signs
Browse files Browse the repository at this point in the history
  • Loading branch information
chunlaw committed Jun 1, 2024
1 parent 0150965 commit edc7f29
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/components/Weather.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ export const useWeather = () => {
export const useWeatherCode = () => {
const weather = useWeather();
return Object.values(weather)
.filter(({ actionCode }) => actionCode !== "CANCEL")
.map(({ code }) => code)
.filter((code) => CODE_ORDER.indexOf(code) >= 0)
.sort((a, b) => (CODE_ORDER.indexOf(a) < CODE_ORDER.indexOf(b) ? -1 : 1));
Expand Down

0 comments on commit edc7f29

Please sign in to comment.