diff options
Diffstat (limited to 'modern/src/App.js')
-rw-r--r-- | modern/src/App.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/modern/src/App.js b/modern/src/App.js index e21cf1bf..62f0d749 100644 --- a/modern/src/App.js +++ b/modern/src/App.js @@ -27,6 +27,7 @@ const App = () => { const desktop = useMediaQuery(theme.breakpoints.up('md')); + const newServer = useSelector((state) => state.session.server.newServer); const initialized = useSelector((state) => !!state.session.user); useEffectAsync(async () => { @@ -34,6 +35,8 @@ const App = () => { const response = await fetch('/api/session'); if (response.ok) { dispatch(sessionActions.updateUser(await response.json())); + } else if (newServer) { + navigate('/register'); } else { navigate('/login'); } |