Skip to content

Commit

Permalink
Merge pull request #1859 from habitat-sh/sougata/stable_message
Browse files Browse the repository at this point in the history
Added conditional render for deprecated stable message
  • Loading branch information
sougata-progress authored Dec 3, 2024
2 parents ace3f05 + a85d495 commit 198dc31
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ <h3 style="margin-bottom: 0px;"> {{ latestLTS }}</h3>
</section>
<section class="latest-stable">
<h3 style="margin-bottom: 0px;">Stable
<hab-icon symbol="alert" title="Stable Channel is going to be deprecated for core, chef and chef-platform origins. We will communicate the details on EOL dates soon" style="float: none;"></hab-icon>
<hab-icon [hidden]="!shouldRenderDeprecation()" symbol="alert" title="Stable Channel is going to be deprecated for core, chef and chef-platform origins. We will communicate the details on EOL dates soon" style="float: none;"></hab-icon>
</h3>
<div *ngIf="latestStable">
<a [routerLink]="['./', latestStable.ident.version, latestStable.ident.release]">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,4 +157,9 @@ export class PackageSidebarComponent {

return channelExist?.name === this.latestLTS ? true : false;
}

shouldRenderDeprecation(): boolean {
let state = this.store.getState();
return state.features.enableLTS;
}
}

0 comments on commit 198dc31

Please sign in to comment.