File tree 4 files changed +17
-5
lines changed
4 files changed +17
-5
lines changed Original file line number Diff line number Diff line change @@ -7,12 +7,14 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
7
7
8
8
Generated by [ ` auto-changelog ` ] ( https://github.com/CookPete/auto-changelog ) .
9
9
10
- ## [ v0.0.2 ] ( https://github.com/sw-yx/react-netlify-identity-widget/compare/v0.0.1...v0.0.2 ) - 2019-04-24
10
+ ## [ v0.0.3 ] ( https://github.com/sw-yx/react-netlify-identity-widget/compare/v0.0.1...v0.0.3 ) - 2019-04-24
11
11
12
12
### Commits
13
13
14
14
- fix dist [ ` 4746911 ` ] ( https://github.com/sw-yx/react-netlify-identity-widget/commit/474691107f143205dbf89085a26053dce190e585 )
15
15
- fix: fix it [ ` 8a2ffbd ` ] ( https://github.com/sw-yx/react-netlify-identity-widget/commit/8a2ffbda8cbadcbefa34118dbac67e86685d842b )
16
16
- fix(filename): just adding husky [ ` 1d748c3 ` ] ( https://github.com/sw-yx/react-netlify-identity-widget/commit/1d748c33c44a300b55b58e6a4490a78691bea33e )
17
17
18
+ ## v0.0.2 - 2019-04-22
19
+
18
20
## v0.0.1 - 2019-04-22
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " react-netlify-identity-widget" ,
3
- "version" : " 0.0.2 " ,
3
+ "version" : " 0.0.3 " ,
4
4
"main" : " dist/index.js" ,
5
5
"umd:main" : " dist/reactNetlifyIdentityWidget.umd.production.js" ,
6
6
"module" : " dist/reactNetlifyIdentityWidget.es.production.js" ,
Original file line number Diff line number Diff line change 1
1
import React from "react"
2
2
import { useNetlifyIdentity } from "react-netlify-identity"
3
-
3
+ import { Login } from "./login"
4
+ import { Logout } from "./logout"
4
5
// import Modal from "./modal"
5
6
// import SiteURLForm from "./forms/siteurl"
6
7
// import LogoutForm from "./forms/logout"
@@ -58,10 +59,10 @@ import { IdentityContext } from "./context"
58
59
// }
59
60
60
61
function LoggedOutScreen ( ) {
61
- return < div > logged out </ div >
62
+ return < Login / >
62
63
}
63
64
function LoggedInScreen ( ) {
64
- return < div > logged in </ div >
65
+ return < Logout / >
65
66
}
66
67
67
68
function Gate ( ) {
Original file line number Diff line number Diff line change
1
+ import React from "react"
2
+ import { IdentityContext } from "./context"
3
+
4
+ export function Logout ( ) {
5
+ const identity = React . useContext ( IdentityContext )
6
+ if ( ! identity ) throw new Error ( "bad context" )
7
+
8
+ return < button onClick = { identity . logoutUser } > You are signed in. Log Out</ button >
9
+ }
You can’t perform that action at this time.
0 commit comments