Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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.

3 participants