diff --git a/utils/isPageEnabled/isPageEnabled.component.ts b/utils/isPageEnabled/isPageEnabled.component.ts
index 6c9c083a..34fd2593 100644
--- a/utils/isPageEnabled/isPageEnabled.component.ts
+++ b/utils/isPageEnabled/isPageEnabled.component.ts
@@ -18,6 +18,7 @@ import {Subscription} from "rxjs";
})
export class IsPageEnabledComponent implements OnInit, OnDestroy {
@Input() pageRoute:string;
+ @Input() communityId:string;
public properties: EnvProperties = properties;
pageEnabled = false;
@@ -33,10 +34,7 @@ export class IsPageEnabledComponent implements OnInit, OnDestroy {
ngOnInit() {
- this.subs.push(this.communityService.getCommunityAsObservable().subscribe( community => {
- this.community = community;
- this.getPageStatus();
- }));
+ this.getPageStatus();
}
ngOnDestroy() {
@@ -51,7 +49,7 @@ export class IsPageEnabledComponent implements OnInit, OnDestroy {
private getPageStatus() {
- this.configurationService.isPageEnabled(this.properties, this.community.communityId, '/' + this.pageRoute).subscribe((page) => {
+ this.configurationService.isPageEnabled(this.properties, this.communityId, '/' + this.pageRoute).subscribe((page) => {
this.pageEnabled = page;
})
}