@@ -12,35 +12,44 @@ function App() {
12
12
return (
13
13
< IdentityContextProvider value = { identity } >
14
14
< div className = "App" >
15
- { identity && identity . isLoggedIn ? (
16
- < header className = "App-header" >
17
- < h1 > hello { name } !</ h1 >
18
- { avatar_url && < img src = { avatar_url } style = { { height : 100 , borderRadius : "50%" } } /> }
19
- < button className = "btn" style = { { maxWidth : 400 , background : "orangered" } } onClick = { ( ) => setDialog ( true ) } >
20
- LOG OUT
21
- </ button >
22
-
23
- < IdentityModal showDialog = { dialog } onCloseDialog = { ( ) => setDialog ( false ) } />
24
- </ header >
25
- ) : (
26
- < header className = "App-header" >
27
- < h1 > hello! try logging in! </ h1 >
28
- < button className = "btn" style = { { maxWidth : 400 , background : "darkgreen" } } onClick = { ( ) => setDialog ( true ) } >
29
- LOG IN
30
- </ button >
31
- < IdentityModal showDialog = { dialog } onCloseDialog = { ( ) => setDialog ( false ) } />
32
- </ header >
33
- ) }
34
- < h3 >
35
- Or{ " " }
36
- < a
37
- href = "https://github.com/sw-yx/react-netlify-identity-widget"
38
- target = "_blank"
39
- style = { { color : "powderblue" } }
40
- >
41
- view the source
42
- </ a >
43
- </ h3 >
15
+ < header className = "App-header" >
16
+ { identity && identity . isLoggedIn ? (
17
+ < >
18
+ < h1 > hello { name } !</ h1 >
19
+ { avatar_url && < img src = { avatar_url } style = { { height : 100 , borderRadius : "50%" } } /> }
20
+ < button
21
+ className = "btn"
22
+ style = { { maxWidth : 400 , background : "orangered" } }
23
+ onClick = { ( ) => setDialog ( true ) }
24
+ >
25
+ LOG OUT
26
+ </ button >
27
+ < IdentityModal showDialog = { dialog } onCloseDialog = { ( ) => setDialog ( false ) } />
28
+ </ >
29
+ ) : (
30
+ < >
31
+ < h1 > hello! try logging in! </ h1 >
32
+ < button
33
+ className = "btn"
34
+ style = { { maxWidth : 400 , background : "darkgreen" } }
35
+ onClick = { ( ) => setDialog ( true ) }
36
+ >
37
+ LOG IN
38
+ </ button >
39
+ < IdentityModal showDialog = { dialog } onCloseDialog = { ( ) => setDialog ( false ) } />
40
+ </ >
41
+ ) }
42
+ < h3 >
43
+ Or{ " " }
44
+ < a
45
+ href = "https://github.com/sw-yx/react-netlify-identity-widget"
46
+ target = "_blank"
47
+ style = { { color : "powderblue" } }
48
+ >
49
+ view the source
50
+ </ a >
51
+ </ h3 >
52
+ </ header >
44
53
</ div >
45
54
</ IdentityContextProvider >
46
55
)
0 commit comments