Skip to content

Commit

Permalink
Merge pull request #67 from BinaryStudioAcademy/hotfix/header-location
Browse files Browse the repository at this point in the history
Remove header from the landing and auth pages
  • Loading branch information
tatianahutii committed Aug 31, 2023
2 parents 775521e + 9eddeb1 commit e9cffea
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
3 changes: 3 additions & 0 deletions frontend/src/app/app.component.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<app-loading-spinner></app-loading-spinner>
<app-header *ngIf="!isAuthPage"></app-header>
<router-outlet></router-outlet>
7 changes: 6 additions & 1 deletion frontend/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ import { SpinnerService } from '@core/services/spinner.service';

@Component({
selector: 'app-root',
template: '<app-loading-spinner></app-loading-spinner><app-header></app-header><router-outlet></router-outlet>',
templateUrl: './app.component.html',
})
export class AppComponent {
isAuthPage: boolean;

constructor(private router: Router, private spinner: SpinnerService) {
this.listenRouter();
}
Expand All @@ -23,6 +25,9 @@ export class AppComponent {
) {
this.spinner.hide();
}
if (event instanceof NavigationStart) {
this.isAuthPage = event.url.startsWith('/auth') || event.url === '/';
}
});
}
}

0 comments on commit e9cffea

Please sign in to comment.