Skip to content

Commit

Permalink
feat: user and loggedIn shortcuts
Browse files Browse the repository at this point in the history
  • Loading branch information
Pooya Parsa committed Feb 20, 2018
1 parent c9ad43a commit 13a5eec
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/auth/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,14 @@ export default class Auth {
// User helpers
// ---------------------------------------------------------------

get user () {
return this.state.user
}

get loggedIn () {
return this.state.loggedIn
}

fetchUserOnce () {
if (!this.state.user) {
return this.fetchUser(...arguments)
Expand Down

0 comments on commit 13a5eec

Please sign in to comment.