Skip to content

Commit

Permalink
fix: refactor app body to return class instead (#1053)
Browse files Browse the repository at this point in the history
  • Loading branch information
minghay authored May 14, 2024
1 parent ff8daf2 commit 1163f99
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
11 changes: 9 additions & 2 deletions app/components/app-body/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,14 @@ import { service } from '@ember/service';
export default class AppBody extends Component {
@service router;

get isPipelineRoute() {
return this.router.currentRouteName.startsWith('pipeline');
get class() {
if (
this.router.currentRouteName.startsWith('pipeline') ||
this.router.currentRouteName.startsWith('v2.pipeline')
) {
return 'pipeline-page';
}

return 'container-fluid';
}
}
2 changes: 1 addition & 1 deletion app/components/app-body/template.hbs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<NavBanner />

<div id="appContainer" class='{{if this.isPipelineRoute 'pipeline-page' 'container-fluid'}}'>
<div id="appContainer" class='{{this.class}}'>
{{outlet}}
</div>

0 comments on commit 1163f99

Please sign in to comment.