@@ -16,7 +16,6 @@ import { takeUntil } from "rxjs/operators";
1616import { ProjectNav } from "./project-nav.model" ;
1717import { EntityName } from "../shared/entity-name.model" ;
1818import { NavItem } from "../../shared/nav/nav-item.model" ;
19- import { ReleaseService } from "../shared/release.service" ;
2019
2120@Component ( {
2221 selector : "project-nav" ,
@@ -28,6 +27,7 @@ export class ProjectNavComponent {
2827 // Inputs
2928 @Input ( ) externalResourcesExist : boolean ;
3029 @Input ( ) projectInRelease : boolean ;
30+ @Input ( ) releaseFeatureEnabled : boolean ;
3131
3232 // Locals
3333 private dataCitation : NavItem ;
@@ -43,11 +43,9 @@ export class ProjectNavComponent {
4343 /**
4444 * @param {ActivatedRoute } route
4545 * @param {DeviceDetectorService } deviceService
46- * @param {ReleaseService } releaseService
4746 */
4847 constructor ( private route : ActivatedRoute ,
49- private deviceService : DeviceDetectorService ,
50- private releaseService : ReleaseService ) {
48+ private deviceService : DeviceDetectorService ) {
5149 }
5250
5351 /**
@@ -77,7 +75,7 @@ export class ProjectNavComponent {
7775 ] ;
7876
7977 // Check if project is a part of the release and add "releases" to the nav accordingly
80- if ( this . releaseService . isReleaseVisible ( ) && this . projectInRelease ) {
78+ if ( this . releaseFeatureEnabled && this . projectInRelease ) {
8179
8280 navItemList . push ( this . projectReleases ) ;
8381 }
@@ -178,7 +176,7 @@ export class ProjectNavComponent {
178176 routerLink : this . buildRouterLinkForSection ( projectId , ProjectNav . DATA_CITATION )
179177 } ;
180178
181- if ( this . releaseService . isReleaseVisible ( ) ) {
179+ if ( this . releaseFeatureEnabled ) {
182180 this . projectReleases = {
183181 disabled : false ,
184182 display : "Releases" ,
0 commit comments