aboutsummaryrefslogtreecommitdiff
path: root/vnext/src/index.js
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-06-25 13:02:30 +0300
committerGravatar Vitaly Takmazov2023-01-13 10:37:53 +0300
commit28679bfba2d4160cd54fe368e5412aa622cd8c6e (patch)
treea532f4074a9492733a9bad67ed552d8bf18bb3ee /vnext/src/index.js
parentcfc03954dcc9d4446e5993c6cdfb5e7e73d71a71 (diff)
transform-class-properties
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}`)