Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c335482

Browse files
Get UI base URL from BE (#744)
1 parent 6e281ba commit c335482

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/app/login-page/autoregistration/autoregistration.component.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ import { getBaseUrl } from '../../shared/clarin-shared-util';
2828
import { ConfigurationProperty } from '../../core/shared/configuration-property.model';
2929
import { RemoteData } from '../../core/data/remote-data';
3030
import { HardRedirectService } from '../../core/services/hard-redirect.service';
31-
import { environment } from '../../../environments/environment';
3231

3332
/**
3433
* This component is showed up when the user has clicked on the `verification token`.
@@ -174,7 +173,10 @@ export class AutoregistrationComponent implements OnInit {
174173
// Use hard redirect to load all components from the beginning as the logged-in user. Because some components
175174
// are not loaded correctly when the user is logged in e.g., `log in` button is still visible instead of
176175
// log out button.
177-
this.hardRedirectService.redirect(environment.ui.baseUrl + 'home');
176+
const redirectUrl = this.baseUrl.endsWith('/')
177+
? `${this.baseUrl}home`
178+
: `${this.baseUrl}/home`;
179+
this.hardRedirectService.redirect(redirectUrl);
178180
} else {
179181
this.notificationService.error(this.translateService.instant('clarin.autologin.error.message'));
180182
}

0 commit comments

Comments
 (0)