diff options
author | 2018-06-09 15:50:47 +0300 | |
---|---|---|
committer | 2023-01-13 10:37:52 +0300 | |
commit | 733343545f2be35f192011f2741dc8c41948cac8 (patch) | |
tree | ba1d4fef36529965b1344f2016e312ad2269816a /vnext/src/components/LoginButton.js | |
parent | 4e744b4ac064133d36f75799139607508e1cb8d1 (diff) |
many updates
Diffstat (limited to 'vnext/src/components/LoginButton.js')
-rw-r--r-- | vnext/src/components/LoginButton.js | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/vnext/src/components/LoginButton.js b/vnext/src/components/LoginButton.js index 8d298fa2..f35a932d 100644 --- a/vnext/src/components/LoginButton.js +++ b/vnext/src/components/LoginButton.js @@ -1,27 +1,29 @@ -import React from 'react' -import PropTypes from 'prop-types' +import React from 'react'; +import PropTypes from 'prop-types'; +import Icon from './Icon'; + export default class LoginButton extends React.Component { constructor(props) { super(props); - window.addEventListener("message", (event) => { + window.addEventListener('message', (event) => { this.props.onAuth(event.data); }, false); } login(event) { event.preventDefault(); - let loginWindow = window.open("https://juick.com/login?redirect=false", "Login to Juick", "width=400,height=300,resizeable=no,menubar=no,toolbar=no,scrollbars=no"); + let loginWindow = window.open('https://juick.com/login?redirect=false', 'Login to Juick', 'width=400,height=300,resizeable=no,menubar=no,toolbar=no,scrollbars=no'); loginWindow.window.focus(); } render() { return ( - <a href="/login" onClick={this.login}>{this.props.title}</a> - ) + <a href="/login" onClick={this.login}><Icon name="ei-user" size="s"/>{this.props.title}</a> + ); } -}; +} LoginButton.propTypes = { title: PropTypes.string.isRequired, onAuth: PropTypes.func.isRequired -}
\ No newline at end of file +}; |