diff --git a/frontend/src/app/header/header.component.ts b/frontend/src/app/header/header.component.ts index c9ec477..8bb3c13 100644 --- a/frontend/src/app/header/header.component.ts +++ b/frontend/src/app/header/header.component.ts @@ -1,4 +1,4 @@ -import {Component, Input, OnInit} from '@angular/core'; +import {Component, Input} from '@angular/core'; import {ALTITUDE_VERSION} from '../constant'; @Component({ @@ -7,15 +7,11 @@ import {ALTITUDE_VERSION} from '../constant'; templateUrl: './header.component.html', styleUrls: ['./header.component.scss'] }) -export class HeaderComponent implements OnInit { +export class HeaderComponent { @Input() title: string = ''; @Input() sub_title: string = ''; @Input() current_page: string = '' - public ngOnInit(): void { - this.toggleTheme()//TODO fix theme - } - public getCurrentPageId(options: string[]) { if (options.includes(this.current_page)) { return 'current_page' @@ -23,19 +19,5 @@ export class HeaderComponent implements OnInit { return null; } - public setTheme(themeName: string) { - localStorage.setItem('theme', themeName); - document.body.className = themeName; - } - - // function to toggle between light and dark theme - public toggleTheme() { - if (localStorage.getItem('theme') === 'theme-light') { - this.setTheme('theme-dark'); - } else { - this.setTheme('theme-light'); - } - } - protected readonly ALTITUDE_VERSION = ALTITUDE_VERSION; }