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

better handling provider tile update #1000

Merged
merged 1 commit into from
Mar 12, 2020
Merged

Conversation

heshan0131
Copy link
Contributor

#990
Signed-off-by: Shan He heshan0131@gmail.com

Signed-off-by: Shan He <heshan0131@gmail.com>
export const ProviderSelect = ({
cloudProviders = [],
onSelect,
onSetCloudProvider,
Copy link
Collaborator

Choose a reason for hiding this comment

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

is this still used?

Copy link
Contributor Author

@heshan0131 heshan0131 Mar 12, 2020

Choose a reason for hiding this comment

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

it is passed to CloudTile


_selectProvider = providerName => {
this.props.onSetCloudProvider(providerName);
const provider = (this.props.cloudProviders || []).find(p => p.name === providerName);
Copy link
Collaborator

Choose a reason for hiding this comment

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

what if provider is null?

I know we have a check in getSavedMaps but should we even dispatch the action if provider is undefined

Copy link
Contributor Author

@heshan0131 heshan0131 Mar 12, 2020

Choose a reason for hiding this comment

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

_selectProvider is callback passed to ProviderSelect which is rendered by cloudProviders.map(provider => ...). I don't think it is possible forprovider to be undefined

@heshan0131 heshan0131 merged commit c6586c8 into master Mar 12, 2020
@delete-merged-branch delete-merged-branch bot deleted the provider-logout-state branch March 12, 2020 09:11
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