mirror of
https://github.com/kingomarnajjar/flex-template-web.git
synced 2026-07-26 06:47:17 +10:00
Call functions from window more explicitly
This commit is contained in:
parent
49229c7aaa
commit
0f9da68d35
1 changed files with 3 additions and 2 deletions
|
|
@ -29,16 +29,17 @@ const RedirectLandingPage = () => <Redirect to="/" />;
|
|||
|
||||
// Fake authentication module
|
||||
// An example from react-router v4 repository
|
||||
// This will be replaced once we have redux store and sdk
|
||||
export const fakeAuth = {
|
||||
isAuthenticated: false,
|
||||
authenticate(cb) {
|
||||
this.isAuthenticated = true;
|
||||
setTimeout(cb, 100); // fake async
|
||||
window.setTimeout(cb, 100); // fake async
|
||||
},
|
||||
signout(cb) {
|
||||
this.isAuthenticated = false;
|
||||
cb();
|
||||
setTimeout(cb, 100); // weird bug if async?
|
||||
window.setTimeout(cb, 100); // weird bug if async?
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue