Skip to content

Commit 13a5eec

Browse files
author
Pooya Parsa
committed
feat: user and loggedIn shortcuts
1 parent c9ad43a commit 13a5eec

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lib/auth/auth.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,14 @@ export default class Auth {
330330
// User helpers
331331
// ---------------------------------------------------------------
332332

333+
get user () {
334+
return this.state.user
335+
}
336+
337+
get loggedIn () {
338+
return this.state.loggedIn
339+
}
340+
333341
fetchUserOnce () {
334342
if (!this.state.user) {
335343
return this.fetchUser(...arguments)

0 commit comments

Comments
 (0)