Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request #129

Open
coopernicholas opened this issue Sep 4, 2024 · 0 comments
Open

Feature Request #129

coopernicholas opened this issue Sep 4, 2024 · 0 comments

Comments

@coopernicholas
Copy link

coopernicholas commented Sep 4, 2024

It would be pretty cool if we could display any weather alerts in that location. I'm currently doing it outside of the module but maybe it could be integrated one day.

useEffect(() => {
    axios
      .get("https://weather.visualcrossing.com/VisualCrossingWebServices/rest/services/timeline/KCKV/today?unitGroup=us&include=alerts&key=TS5327MKZFMHYAYNGEYVZTPM4&contentType=json", {
      })
      .then((response) => {
      setWalert(response.data['alerts']);
      });
  }, []);  

  const walerts = walert.map((item) => (
    <CBadge color="danger" shape="rounded-pill" style={{marginLeft:'5px'}}>
    {item.event} <span className="visually-hidden">weather alert</span>
    </CBadge>
  ))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant