File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ function AuthExample() {
38
38
) ;
39
39
}
40
40
41
- const fakeAuth = {
41
+ const netlifyAuth = {
42
42
isAuthenticated : false ,
43
43
authenticate ( cb ) {
44
44
this . isAuthenticated = true ;
@@ -56,12 +56,12 @@ const fakeAuth = {
56
56
57
57
const AuthButton = withRouter (
58
58
( { history } ) =>
59
- fakeAuth . isAuthenticated ? (
59
+ netlifyAuth . isAuthenticated ? (
60
60
< p >
61
61
Welcome!{ ' ' }
62
62
< button
63
63
onClick = { ( ) => {
64
- fakeAuth . signout ( ( ) => history . push ( '/' ) ) ;
64
+ netlifyAuth . signout ( ( ) => history . push ( '/' ) ) ;
65
65
} }
66
66
>
67
67
Sign out
@@ -77,7 +77,7 @@ function PrivateRoute({ component: Component, ...rest }) {
77
77
< Route
78
78
{ ...rest }
79
79
render = { props =>
80
- fakeAuth . isAuthenticated ? (
80
+ netlifyAuth . isAuthenticated ? (
81
81
< Component { ...props } />
82
82
) : (
83
83
< Redirect
@@ -96,7 +96,7 @@ class Login extends React.Component {
96
96
state = { redirectToReferrer : false } ;
97
97
98
98
login = ( ) => {
99
- fakeAuth . authenticate ( ( ) => {
99
+ netlifyAuth . authenticate ( ( ) => {
100
100
this . setState ( { redirectToReferrer : true } ) ;
101
101
} ) ;
102
102
} ;
You can’t perform that action at this time.
0 commit comments