u
This commit is contained in:
@@ -57,10 +57,16 @@ class App extends PureComponent {
|
||||
}
|
||||
|
||||
if (status !== 'authed') {
|
||||
if (typeof window !== 'undefined' && window.location.pathname === '/oauth/authorize') {
|
||||
const returnTo = encodeURIComponent(window.location.pathname + window.location.search);
|
||||
window.history.replaceState(null, '', `/login?returnTo=${returnTo}`);
|
||||
}
|
||||
return <LoginPage />;
|
||||
}
|
||||
|
||||
if (user?.selectedCompanyId == null) {
|
||||
const isOAuthAuthorize = typeof window !== 'undefined' && window.location.pathname === '/oauth/authorize';
|
||||
|
||||
if (user?.selectedCompanyId == null && !isOAuthAuthorize) {
|
||||
return <CompanySetupDialog />;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user