Skip to content

Commit

Permalink
build error fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
seiyria committed Apr 22, 2024
1 parent 3604d42 commit e86d7ae
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
import { Component, Input, type OnInit } from '@angular/core';
import { Component, inject, Input, type OnInit } from '@angular/core';
import { type ICard } from '../../../../../interfaces';
import { type CardsService } from '../../../cards.service';
import { CardsService } from '../../../cards.service';

@Component({
selector: 'app-card-display',
templateUrl: './card-display.component.html',
styleUrls: ['./card-display.component.scss'],
})
export class CardDisplayComponent implements OnInit {
private cardsService = inject(CardsService);

@Input() size: 'grid' | 'small' | 'normal' | 'large' = 'normal';
@Input() cardCode!: string;
@Input() display: 'images' | 'text' = 'images';

public card: ICard | undefined;
public soulArray = [];

constructor(private cardsService: CardsService) {}

ngOnInit() {
this.card = this.cardsService.getCardById(this.cardCode);
}
Expand Down
8 changes: 3 additions & 5 deletions src/app/home/home.page.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
import { Component } from '@angular/core';
import { type Router } from '@angular/router';
import { Component, inject } from '@angular/core';
import { Router } from '@angular/router';

@Component({
selector: 'app-home',
templateUrl: 'home.page.html',
styleUrls: ['home.page.scss'],
})
export class HomePage {
private router = inject(Router);

public searchQuery = '';

constructor(private router: Router) {}

search(query: string) {
this.router.navigate(['/search'], { queryParams: { q: query } });
}

}

0 comments on commit e86d7ae

Please sign in to comment.