amelioration du style globale

This commit is contained in:
MiharyR 2021-11-26 17:05:12 +01:00
parent cd1f323686
commit d1ac1b77f0
36 changed files with 191 additions and 112 deletions

View file

@ -1,6 +1,6 @@
import {Component, Input, OnInit} from '@angular/core';
import {Advert} from "../../../../utils/interfaces/advert";
import {ThemeService} from "../../../../utils/services/theme/theme.service";
import {Router} from "@angular/router";
@ -15,16 +15,17 @@ export class AdvertComponent implements OnInit
@Input() from: string = "search";
idxImage: number = 0;
constructor(public themeService: ThemeService) { }
constructor(private router: Router) { }
ngOnInit(): void
{
const nbImages = this.ad.images.length;
this.idxImage = Math.floor(Math.random() * nbImages);
}
onClick(): void
{
document.location.href = this.ad.url;
}
}