diff --git a/src/app/search-stakeholders/search-stakeholders.component.ts b/src/app/search-stakeholders/search-stakeholders.component.ts index b9f4f3f..b91df3b 100644 --- a/src/app/search-stakeholders/search-stakeholders.component.ts +++ b/src/app/search-stakeholders/search-stakeholders.component.ts @@ -13,6 +13,7 @@ import {UserManagementService} from "../openaireLibrary/services/user-management import {StakeholderService} from "../openaireLibrary/monitor/services/stakeholder.service"; import {NewSearchPageComponent} from "../openaireLibrary/searchPages/searchUtils/newSearchPage.component"; import {StakeholderInfo} from "../openaireLibrary/monitor/entities/stakeholder"; +import {properties} from "../../environments/environment"; @Component({ selector: 'search-stakeholders', @@ -59,7 +60,7 @@ export class SearchStakeholdersComponent { }; public keyword = ""; public searchLink; - properties: EnvProperties; + properties: EnvProperties = properties; @ViewChild(NewSearchPageComponent) searchPage: NewSearchPageComponent; private user: User; private userFilterLoaded: boolean = false; @@ -73,12 +74,8 @@ export class SearchStakeholdersComponent { } public ngOnInit() { - this.route.data - .subscribe((data: { envSpecific: EnvProperties }) => { - this.properties = data.envSpecific; - this.piwikSiteId = this.properties.piwikSiteId; - this.baseUrl = "/search/find/stakeholders"; - }); + this.piwikSiteId = this.properties.piwikSiteId; + this.baseUrl = this.properties.searchLinkToStakeholders; this.sub = this.route.queryParams.subscribe(params => { this.searchPage.resultsPerPage = 10; this.keyword = (params['fv0'] ? params['fv0'] : '');