forked from p15670423/monkey
Don't query completed steps if not logged in
This commit is contained in:
parent
28ef2d8708
commit
9e169980e3
|
@ -26,6 +26,7 @@ let guardicoreLogoImage = require('../images/guardicore-logo.png');
|
||||||
|
|
||||||
class AppComponent extends AuthComponent {
|
class AppComponent extends AuthComponent {
|
||||||
updateStatus = () => {
|
updateStatus = () => {
|
||||||
|
if (this.auth.loggedIn()){
|
||||||
this.authFetch('/api')
|
this.authFetch('/api')
|
||||||
.then(res => res.json())
|
.then(res => res.json())
|
||||||
.then(res => {
|
.then(res => {
|
||||||
|
@ -41,6 +42,7 @@ class AppComponent extends AuthComponent {
|
||||||
this.setState({completedSteps: res['completed_steps']});
|
this.setState({completedSteps: res['completed_steps']});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
renderRoute = (route_path, page_component, is_exact_path = false) => {
|
renderRoute = (route_path, page_component, is_exact_path = false) => {
|
||||||
|
|
Loading…
Reference in New Issue