Skip to content

Commit

Permalink
Fix linter issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Cito committed Dec 2, 2024
1 parent f319dc7 commit 517c709
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 14 deletions.
1 change: 1 addition & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ export default [
'jsdoc/require-jsdoc': [
'warn',
{
exemptEmptyConstructors: true,
require: {
FunctionDeclaration: true,
MethodDefinition: true,
Expand Down
12 changes: 4 additions & 8 deletions src/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Component, OnInit } from '@angular/core';
import { Component, inject, OnInit } from '@angular/core';
import { MatIconRegistry } from '@angular/material/icon';
import { RouterOutlet } from '@angular/router';
import { ShowSessionComponent } from '@app/portal/features/show-session/show-session.component';
Expand All @@ -19,16 +19,12 @@ import { SiteHeaderComponent } from '@app/portal/features/site-header/site-heade
templateUrl: './app.component.html',
})
export class AppComponent implements OnInit {
/**
* Creating new instance of MatIconRegistry
* @param matIconReg
*/
constructor(private matIconReg: MatIconRegistry) {}
#matIconReg = inject(MatIconRegistry);

/**
* Run on App component initialisation
* Run on App component initialization
*/
ngOnInit(): void {
this.matIconReg.setDefaultFontSetClass('material-symbols-outlined');
this.#matIconReg.setDefaultFontSetClass('material-symbols-outlined');
}
}
14 changes: 8 additions & 6 deletions src/app/portal/features/site-header/site-header.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,19 @@ import { AuthService } from '@app/auth/services/auth.service';
styleUrl: './site-header.component.scss',
})
export class SiteHeaderComponent {
#router = inject(Router);
#authService = inject(AuthService);
isLoggedIn = this.#authService.isLoggedIn;

route: string = '';
constructor(private router: Router) {
this.router.events.subscribe((event) => {

constructor() {
this.#router.events.subscribe((event) => {
if (event instanceof NavigationEnd) {
this.route = this.router.url;
this.route = this.#router.url;
} else return;
});
}
#authService = inject(AuthService);

isLoggedIn = this.#authService.isLoggedIn;

/**
* User login
Expand Down

0 comments on commit 517c709

Please sign in to comment.