Fixed issue with desktop app causing white screen (#1853)

* Fixed issue with desktop app causing white screen

* Handled for personal server mode
This commit is contained in:
Harshil Sharma 2021-11-23 16:05:45 +05:30 committed by GitHub
parent deaffe7863
commit 5730fb4bfe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -145,6 +145,33 @@ const App = React.memo((): JSX.Element => {
<NewVersionBanner/>
<Switch>
{globalErrorRedirect}
{
Utils.isFocalboardPlugin() &&
<Route
path='/'
exact={true}
render={() => {
if (loggedIn === false) {
return <Redirect to='/login'/>
}
if (continueToWelcomeScreen()) {
return <Redirect to={'/welcome'}/>
}
if (Utils.isFocalboardPlugin() && UserSettings.lastWorkspaceId) {
return <Redirect to={`/workspace/${UserSettings.lastWorkspaceId}/${UserSettings.lastBoardId}/${UserSettings.lastViewId}`}/>
}
if (loggedIn === true) {
return <BoardPage/>
}
return null
}}
/>
}
<Route path='/error'>
<ErrorPage/>
</Route>