Skip to content

Commit

Permalink
code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
lombardi-gux committed Jan 4, 2022
1 parent 046d59a commit a6bf132
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 13 deletions.
12 changes: 4 additions & 8 deletions client/src/app/shared/footer/footer.component.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
import { Component, OnInit, HostBinding } from '@angular/core';
import { Component, HostBinding, OnInit } from '@angular/core';

@Component({
selector: 'app-footer',
templateUrl: './footer.component.html'
templateUrl: './footer.component.html',
})
export class FooterComponent implements OnInit {
@HostBinding('class.site-footer')
@HostBinding('class.fixed-bottom')
true;
@HostBinding('class.site-footer') true;
private startYear = 2018;
public date: string;

constructor() {}

ngOnInit() {
ngOnInit(): void {
const currentYear: number = new Date().getFullYear();
this.date = this.startYear === currentYear ? `${currentYear}` : `${this.startYear}-${currentYear}`;
}
Expand Down
9 changes: 4 additions & 5 deletions client/src/app/shared/header/header.component.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import { Component, OnInit, HostBinding, ViewChild, ElementRef } from '@angular/core';
import { Component, ElementRef, HostBinding, OnInit, ViewChild } from '@angular/core';

@Component({
selector: 'app-header',
templateUrl: './header.component.html'
templateUrl: './header.component.html',
})
export class HeaderComponent implements OnInit {
@HostBinding('class.site-header')
true;
@HostBinding('class.site-header') true;

@ViewChild('searchLink', { read: true })
searchLink: ElementRef;
Expand All @@ -22,7 +21,7 @@ export class HeaderComponent implements OnInit {

ngOnInit() {}

toggleSearch = function($event: Event) {
toggleSearch = function ($event: Event) {
$event.preventDefault();

if (this.searchActive) {
Expand Down

0 comments on commit a6bf132

Please sign in to comment.