Skip to content

Instantly share code, notes, and snippets.

@funador
Last active July 29, 2018 17:03
Show Gist options
  • Save funador/faf5972820b75f9990642d8b61933737 to your computer and use it in GitHub Desktop.
Save funador/faf5972820b75f9990642d8b61933737 to your computer and use it in GitHub Desktop.
export default class OAuth extends Component {
// previous lifecycle methods
// previous custom methods
render() {
const { name, photo} = this.state.user
const { provider } = this.props
const { disabled } = this.state
return (
<div>
{name
? <div className={'card'}>
<img src={photo} alt={name} />
<FontAwesome
name={'times-circle'}
className={'close'}
onClick={this.closeCard.bind(this)}
/>
<h4>{name}</h4>
</div>
: <div className={'button-wrapper fadein-fast'}>
<button
onClick={this.startAuth.bind(this)}
className={`${provider} ${disabled} button`}
>
<FontAwesome
name={provider}
/>
</button>
</div>
}
</div>
)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment