Skip to content

Commit

Permalink
Get UI base URL from BE (#744)
Browse files Browse the repository at this point in the history
  • Loading branch information
milanmajchrak authored Nov 26, 2024
1 parent 6e281ba commit c335482
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import { getBaseUrl } from '../../shared/clarin-shared-util';
import { ConfigurationProperty } from '../../core/shared/configuration-property.model';
import { RemoteData } from '../../core/data/remote-data';
import { HardRedirectService } from '../../core/services/hard-redirect.service';
import { environment } from '../../../environments/environment';

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

0 comments on commit c335482

Please sign in to comment.