Skip to content

Commit

Permalink
Merge pull request #2 from alekseykravetz/feature/sdk-loaded-event
Browse files Browse the repository at this point in the history
edded sdk loaded event
  • Loading branch information
alekseykravetz authored Nov 8, 2018
2 parents 46924fa + 3fd1fb7 commit 828bfee
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion dist/social-login.js

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ const SocialLogin = (WrappedComponent) => class SocialLogin extends Component {
...prevState,
isLoaded: true
}), () => {
if (typeof this.props.onLoaded === 'function') {
this.props.onLoaded()
}
if (autoLogin || this.accessToken) {
if (this.fetchProvider && !this.accessToken) {
this.sdk.login(appId, redirect)
Expand Down

0 comments on commit 828bfee

Please sign in to comment.