File tree 3 files changed +20
-18
lines changed
3 files changed +20
-18
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"/Users/swyx/Netlify/react-netlify-identity-widget/dist/reactNetlifyIdentityWidget.cjs.development.js" : {
3
- "bundled" : 11694 ,
4
- "minified" : 7556 ,
5
- "gzipped" : 1906
3
+ "bundled" : 11959 ,
4
+ "minified" : 7561 ,
5
+ "gzipped" : 1911
6
6
},
7
7
"/Users/swyx/Netlify/react-netlify-identity-widget/dist/reactNetlifyIdentityWidget.cjs.production.js" : {
8
- "bundled" : 11694 ,
9
- "minified" : 7556 ,
10
- "gzipped" : 1906
8
+ "bundled" : 11959 ,
9
+ "minified" : 7561 ,
10
+ "gzipped" : 1911
11
11
},
12
12
"/Users/swyx/Netlify/react-netlify-identity-widget/dist/reactNetlifyIdentityWidget.umd.development.js" : {
13
- "bundled" : 12617 ,
14
- "minified" : 6616 ,
15
- "gzipped" : 1873
13
+ "bundled" : 12896 ,
14
+ "minified" : 6621 ,
15
+ "gzipped" : 1878
16
16
},
17
17
"/Users/swyx/Netlify/react-netlify-identity-widget/dist/reactNetlifyIdentityWidget.umd.production.js" : {
18
- "bundled" : 12617 ,
19
- "minified" : 6616 ,
20
- "gzipped" : 1873
18
+ "bundled" : 12896 ,
19
+ "minified" : 6621 ,
20
+ "gzipped" : 1878
21
21
},
22
22
"/Users/swyx/Netlify/react-netlify-identity-widget/dist/reactNetlifyIdentityWidget.es.production.js" : {
23
- "bundled" : 11459 ,
24
- "minified" : 7367 ,
25
- "gzipped" : 1855 ,
23
+ "bundled" : 11724 ,
24
+ "minified" : 7372 ,
25
+ "gzipped" : 1860 ,
26
26
"treeshaked" : {
27
27
"rollup" : {
28
28
"code" : 524 ,
Original file line number Diff line number Diff line change @@ -7,13 +7,15 @@ function App() {
7
7
const [ dialog , setDialog ] = React . useState ( false )
8
8
const identity = useNetlifyIdentity ( "https://react-netlify-identity-widget.netlify.com" )
9
9
const name =
10
- ( identity && identity . user && identity . user . user_metadata && identity . user . user_metadata . name ) || "NoName"
10
+ ( identity && identity . user && identity . user . user_metadata && identity . user . user_metadata . full_name ) || "NoName"
11
+ const avatar_url = identity && identity . user && identity . user . user_metadata && identity . user . user_metadata . avatar_url
11
12
return (
12
13
< IdentityContextProvider value = { identity } >
13
14
< div className = "App" >
14
15
{ identity && identity . isLoggedIn ? (
15
16
< header className = "App-header" >
16
17
< h1 > hello { name } !</ h1 >
18
+ { avatar_url && < img src = { avatar_url } style = { { height : 100 , borderRadius : "50%" } } /> }
17
19
< button className = "btn" style = { { maxWidth : 400 , background : "orangered" } } onClick = { ( ) => setDialog ( true ) } >
18
20
LOG OUT
19
21
</ button >
Original file line number Diff line number Diff line change @@ -10,10 +10,10 @@ export function Signup() {
10
10
const [ isLoading , load ] = useLoading ( )
11
11
const signup = ( ) => {
12
12
if ( ! formRef . current ) return
13
- const name = formRef . current . username . value
13
+ const full_name = formRef . current . username . value
14
14
const email = formRef . current . email . value
15
15
const password = formRef . current . password . value
16
- const data = { signupSource : "react-netlify-identity-widget" , name }
16
+ const data = { signupSource : "react-netlify-identity-widget" , full_name }
17
17
load ( signupUser ( email , password , data ) )
18
18
. then ( user => {
19
19
console . log ( "Success! Signed up" , user )
You can’t perform that action at this time.
0 commit comments