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

Make "download data" contents not "[]"/"undefined" #89

Merged
merged 2 commits into from
Mar 2, 2024

Conversation

sid-kap
Copy link
Owner

@sid-kap sid-kap commented Mar 2, 2024

Currently the download link is randomly broken because when the url.current ref changes the <a> doesn't necessarily re-render. Using setState ensures that the <a> re-renders immediately when the data changes.

This currently causes the behavior where the download link gives you a file containing the initial state of data ([] on the comparisons page, undefined on the bar plots) rather than the most up-to-date contents of data (which should be populated once data is successfully fetched).

Copy link

vercel bot commented Mar 2, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
housing-data ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 2, 2024 7:27am

@sid-kap sid-kap merged commit 12912e9 into main Mar 2, 2024
22 checks passed
@sid-kap sid-kap deleted the fix-download-data branch March 2, 2024 07:30
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

Successfully merging this pull request may close these issues.

None yet

1 participant