Created
September 25, 2018 08:54
-
-
Save anabellaspinelli/39961253bbef4d8fc6e5a273717fc804 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bootstrap() { | |
const script = document.createElement('script') | |
script.src = 'https://public-assets.typeform.com/public/oauthbtn/btn.min.js' | |
script.type = 'text/javascript' | |
script.async = true | |
// script.onload = () => this.setState({loading: false}); | |
const scriptConfig = {} | |
scriptConfig['name'] = 'tf-login-button' | |
scriptConfig['data-redirect_uri'] = 'https://www.tremendous.com/' | |
scriptConfig['data-scope'] = 'accounts:read+forms:write+forms:read+responses:read+webhooks:read+webhooks:write' | |
scriptConfig['data-state'] = '' | |
scriptConfig['data-client_id'] = 'clientIDclientIDclientIDclientIDclientIDclientID' | |
Object.keys(scriptConfig).forEach(key => script.setAttribute(key, scriptConfig[key])) | |
document.body.appendChild(script) | |
} | |
render() { | |
return ( | |
<div> | |
<div className='py-5'> | |
<p> | |
To get started, we will need to first connect to your Typeform accounts | |
</p> | |
<div className='tf-login-button' /> | |
</div> | |
</div> | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment