diff --git a/connect/communityGuard/isCommunity.guard.ts b/connect/communityGuard/isCommunity.guard.ts index 6287353a..ec67699b 100644 --- a/connect/communityGuard/isCommunity.guard.ts +++ b/connect/communityGuard/isCommunity.guard.ts @@ -9,6 +9,7 @@ import { import {Observable} from 'rxjs'; import {ConnectHelper} from '../connectHelper'; +import {properties} from "../../../../environments/environment"; @Injectable() export class IsCommunity implements CanActivate, CanLoad { @@ -20,13 +21,13 @@ export class IsCommunity implements CanActivate, CanLoad { if (community && community !== 'undefined') { return true; } else { - this.router.navigate(['errorcommunity']); + this.router.navigate(['error']); return false; } } canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable | boolean { - return this.check(route.queryParams['communityId']); + return this.check((route.queryParams['communityId']) ? route.queryParams['communityId'] : ConnectHelper.getCommunityFromDomain(properties.domain)); } canLoad(route: Route, segments: UrlSegment[]): Observable | Promise | boolean { diff --git a/searchPages/searchUtils/portal-search-result.component.ts b/searchPages/searchUtils/portal-search-result.component.ts index 2495d889..048ed68f 100644 --- a/searchPages/searchUtils/portal-search-result.component.ts +++ b/searchPages/searchUtils/portal-search-result.component.ts @@ -12,7 +12,7 @@ import {Stakeholder, StakeholderInfo} from "../../monitor/entities/stakeholder"; templateUrl: 'portal-search-result.component.html' }) -export class PortalSearchResultComponent implements OnInit, OnChanges{ +export class PortalSearchResultComponent implements OnInit{ @Input() results: (CommunityInfo & StakeholderInfo)[]; @Input() status: number; @Input() type: string; @@ -49,10 +49,7 @@ export class PortalSearchResultComponent implements OnInit, OnChanges{ this.directLink = value; }); } - - ngOnChanges(changes: SimpleChanges) { - console.log(changes); - } + getProductionPrefix(id:string): string { return (this.properties.environment == "production") ? "" : "beta.";