-
Notifications
You must be signed in to change notification settings - Fork 93
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/remove widget dependencies #3512
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good buddy! I have some widgets (loss and FAO) not working at global level on the dashboards. Could you take a look?
@@ -53,7 +52,9 @@ const mapStateToProps = ({ widgets, location }, ownProps) => { | |||
const locationPath = `dashboards/${type || 'global'}/${locationUrl}`; | |||
const widgetQuery = `widget=${widget}`; | |||
const widgetState = | |||
query && query[widget] ? `&${widget}=${query[widget]}` : ''; | |||
query && query[widget] | |||
? `&${widget}=${btoa(JSON.stringify(query[widget]))}` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah ha! You should no longer need to do this. You can now find this state as a clean and tidy object on the location.query.widgets
reducer in the store. You can use a selector to merge the props just like in the map!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't do it to update the current url. Actually it's only for generate the share url that we need to pass to the EXPLORE ON GFW
button on the embed view.
…lects feature/analysis-location-selects
…re/remove-widget-dependencies
…re/remove-widget-dependencies
No description provided.