Skip to content

Commit fcfbbef

Browse files
author
swyx
committed
rename fakeauth
1 parent 04727ed commit fcfbbef

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

example/src/App.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ function AuthExample() {
3838
);
3939
}
4040

41-
const fakeAuth = {
41+
const netlifyAuth = {
4242
isAuthenticated: false,
4343
authenticate(cb) {
4444
this.isAuthenticated = true;
@@ -56,12 +56,12 @@ const fakeAuth = {
5656

5757
const AuthButton = withRouter(
5858
({ history }) =>
59-
fakeAuth.isAuthenticated ? (
59+
netlifyAuth.isAuthenticated ? (
6060
<p>
6161
Welcome!{' '}
6262
<button
6363
onClick={() => {
64-
fakeAuth.signout(() => history.push('/'));
64+
netlifyAuth.signout(() => history.push('/'));
6565
}}
6666
>
6767
Sign out
@@ -77,7 +77,7 @@ function PrivateRoute({ component: Component, ...rest }) {
7777
<Route
7878
{...rest}
7979
render={props =>
80-
fakeAuth.isAuthenticated ? (
80+
netlifyAuth.isAuthenticated ? (
8181
<Component {...props} />
8282
) : (
8383
<Redirect
@@ -96,7 +96,7 @@ class Login extends React.Component {
9696
state = { redirectToReferrer: false };
9797

9898
login = () => {
99-
fakeAuth.authenticate(() => {
99+
netlifyAuth.authenticate(() => {
100100
this.setState({ redirectToReferrer: true });
101101
});
102102
};

0 commit comments

Comments
 (0)