From a6bf132a62a7f7e430b793db154ca6a3299d2777 Mon Sep 17 00:00:00 2001 From: Steve Lombardi Date: Tue, 4 Jan 2022 09:54:34 -0500 Subject: [PATCH] code cleanup --- client/src/app/shared/footer/footer.component.ts | 12 ++++-------- client/src/app/shared/header/header.component.ts | 9 ++++----- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/client/src/app/shared/footer/footer.component.ts b/client/src/app/shared/footer/footer.component.ts index 5a5d6e5..4fa4706 100755 --- a/client/src/app/shared/footer/footer.component.ts +++ b/client/src/app/shared/footer/footer.component.ts @@ -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}`; } diff --git a/client/src/app/shared/header/header.component.ts b/client/src/app/shared/header/header.component.ts index 56148b6..c191632 100755 --- a/client/src/app/shared/header/header.component.ts +++ b/client/src/app/shared/header/header.component.ts @@ -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; @@ -22,7 +21,7 @@ export class HeaderComponent implements OnInit { ngOnInit() {} - toggleSearch = function($event: Event) { + toggleSearch = function ($event: Event) { $event.preventDefault(); if (this.searchActive) {