File tree Expand file tree Collapse file tree 2 files changed +0
-9
lines changed Expand file tree Collapse file tree 2 files changed +0
-9
lines changed Original file line number Diff line number Diff line change 8
8
<h3 class =" nav-title" :aria-hidden =" !showSidebar" v-if =" !showSidebar" >priority-tracker</h3 >
9
9
</nuxt-link >
10
10
</div >
11
- {{ {user} }}
12
11
<div class =" nav-links" v-if =" user" >
13
12
<span class =" username" >Hi {{user.username}}!</span >
14
13
<a href =" #" @click.prevent =" onLogout" ><button >Logout</button ></a >
Original file line number Diff line number Diff line change @@ -17,11 +17,8 @@ export const mutations = {
17
17
18
18
export const actions = {
19
19
init ( { commit, dispatch } ) {
20
- console . log ( 'init' ) ;
21
-
22
20
this . $netlifyIdentity . on ( 'init' , ( user ) => {
23
21
setTimeout ( ( ) => {
24
- console . log ( 'init setUser' ) ;
25
22
if ( user ) {
26
23
commit ( 'setUser' , {
27
24
username : user . user_metadata . full_name . toLowerCase ( ) ,
@@ -35,7 +32,6 @@ export const actions = {
35
32
} )
36
33
this . $netlifyIdentity . on ( 'close' , ( ) => {
37
34
const user = this . $netlifyIdentity . currentUser ( ) ;
38
- console . log ( 'close setUser' ) ;
39
35
40
36
if ( user ) {
41
37
commit ( 'setUser' , {
@@ -53,19 +49,15 @@ export const actions = {
53
49
dispatch ( 'open' , 'signup' )
54
50
} ,
55
51
login ( { dispatch } ) {
56
- console . log ( 'login' ) ;
57
52
dispatch ( 'open' , 'login' )
58
53
} ,
59
54
logout ( { commit } ) {
60
55
this . $netlifyIdentity . logout ( )
61
56
commit ( 'setUser' , null )
62
57
} ,
63
58
open ( { commit } , action ) {
64
- console . log ( 'open' ) ;
65
-
66
59
this . $netlifyIdentity . open ( action )
67
60
this . $netlifyIdentity . on ( action , ( user ) => {
68
- console . log ( 'open setUser' ) ;
69
61
commit ( 'setUser' , {
70
62
username : user . user_metadata . full_name . toLowerCase ( ) ,
71
63
email : user . email ,
You can’t perform that action at this time.
0 commit comments