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/fao global #3400

Merged
merged 4 commits into from
May 11, 2018
Merged

Feature/fao global #3400

merged 4 commits into from
May 11, 2018

Conversation

01painadam
Copy link
Contributor

Overview

Updates FAO reforestation and deforestation ranked widgets to be compatible with the global dashboard.

Notes

  • Both widgets likely need pagination on global view
  • Fixes typo on reforestation widget

Copy link
Contributor

@edbrett edbrett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great. One small change to make code simpler.

dispatch(setWidgetData({ data: hasCountryData ? data : {}, widget }));
dispatch(
setWidgetData({
data: hasCountryData || params.type === 'global' ? data : {},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not remove the country dependancy from the check above instead? So that you only check for data.length

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good spot.

@edbrett edbrett merged commit 081ed87 into feature/global-dashboard May 11, 2018
@edbrett edbrett deleted the feature/fao-global branch May 11, 2018 07:54
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.

2 participants