aboutsummaryrefslogtreecommitdiff
path: root/modern/src/MainPage.js
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2020-09-20 17:56:56 -0700
committerAnton Tananaev <anton.tananaev@gmail.com>2020-09-20 17:56:56 -0700
commitb2cd88bbbad82654057cec8aec7415a8caca667e (patch)
treec9d8485cdd5f2e4fd7558b963d095027c3913e86 /modern/src/MainPage.js
parentfc990dcc50650862c4f12a1a530b98bbd36ea4b8 (diff)
downloadtrackermap-web-b2cd88bbbad82654057cec8aec7415a8caca667e.tar.gz
trackermap-web-b2cd88bbbad82654057cec8aec7415a8caca667e.tar.bz2
trackermap-web-b2cd88bbbad82654057cec8aec7415a8caca667e.zip
Use async functions
Diffstat (limited to 'modern/src/MainPage.js')
-rw-r--r--modern/src/MainPage.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/modern/src/MainPage.js b/modern/src/MainPage.js
index 1ab151fa..b13a263e 100644
--- a/modern/src/MainPage.js
+++ b/modern/src/MainPage.js
@@ -38,10 +38,10 @@ const useStyles = makeStyles(theme => ({
}));
const MainPage = ({ width }) => {
- const authenticated = useSelector(state => state.session.authenticated);
+ const initialized = useSelector(state => !!state.session.server && !!state.session.user);
const classes = useStyles();
- return !authenticated ? (<LinearProgress />) : (
+ return !initialized ? (<LinearProgress />) : (
<div className={classes.root}>
<MainToobar />
<div className={classes.content}>