Skip to content

Commit

Permalink
fix: Let OAuthForm component decide when to remove the OAuth window
Browse files Browse the repository at this point in the history
  • Loading branch information
doubleface authored and probot-auto-merge[bot] committed Aug 5, 2022
1 parent 6143254 commit 59a132f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions packages/cozy-harvest-lib/src/components/OAuthWindow.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ export class OAuthWindow extends PureComponent {
this.setState({ succeed: true })

if (typeof onSuccess !== 'function') return
this.setState({ succeed: true })
onSuccess(data.key)
}

Expand Down Expand Up @@ -159,10 +158,9 @@ export class OAuthWindow extends PureComponent {

render() {
const { t, intentsApi } = this.props
const { oAuthUrl, succeed } = this.state
const { oAuthUrl } = this.state
return (
oAuthUrl &&
!succeed &&
(!isFlagshipApp() && !intentsApi ? (
<Popup
url={oAuthUrl}
Expand Down

0 comments on commit 59a132f

Please sign in to comment.