Merge pull request #5136 from thornbill/login-redirect
Add support for redirecting to the requested page after login
This commit is contained in:
@@ -47,8 +47,9 @@ const ConnectionRequired: FunctionComponent<ConnectionRequiredProps> = ({
|
||||
if (location.pathname === BounceRoutes.Login) {
|
||||
setIsLoading(false);
|
||||
} else {
|
||||
console.debug('[ConnectionRequired] not logged in, redirecting to login page');
|
||||
navigate(`${BounceRoutes.Login}?serverid=${connectionResponse.ApiClient.serverId()}`);
|
||||
console.debug('[ConnectionRequired] not logged in, redirecting to login page', location);
|
||||
const url = encodeURIComponent(location.pathname + location.search);
|
||||
navigate(`${BounceRoutes.Login}?serverid=${connectionResponse.ApiClient.serverId()}&url=${url}`);
|
||||
}
|
||||
return;
|
||||
case ConnectionState.ServerSelection:
|
||||
|
||||
Reference in New Issue
Block a user