aboutsummaryrefslogtreecommitdiff
path: root/vnext/src/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'vnext/src/index.js')
-rw-r--r--vnext/src/index.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/vnext/src/index.js b/vnext/src/index.js
index 556745ff..2caaf5bb 100644
--- a/vnext/src/index.js
+++ b/vnext/src/index.js
@@ -20,7 +20,6 @@ const elClassBackground = 'header--background';
class App extends React.Component {
constructor(props) {
super(props);
- this.auth = this.auth.bind(this);
let params = qs.parse(window.location.search)
if (params.hash) {
window.localStorage.hash = params.hash
@@ -125,7 +124,7 @@ class App extends React.Component {
{user.uid > 0 ?
<Link to={{ pathname: '/post' }}><Icon name="ei-pencil" size="s" />Post</Link>
:
- <LoginButton title="Login" onAuth={this.auth.bind(this)} />
+ <LoginButton title="Login" onAuth={this.auth} />
}
</li>
</ul>
@@ -216,7 +215,7 @@ class App extends React.Component {
</Router>
)
}
- auth(data) {
+ auth = (data) => {
if (data) {
window.localStorage.hash = data;
fetch(`https://api.juick.com/users?hash=${data}`)