optimising and making it better

This commit is contained in:
sdarbinyan
2026-02-26 21:54:21 +04:00
parent 7a00a8f1e3
commit 10b4974719
58 changed files with 318 additions and 1804 deletions

View File

@@ -87,12 +87,6 @@ export class HomeComponent implements OnInit {
topLevel.forEach(cat => {
if (!cat.wideBanner) return;
// API may send wideBanner as a boolean flag instead of a URL
if (cat.wideBanner === true) {
this.wideCategories.update(set => { const next = new Set(set); next.add(cat.categoryID); return next; });
return;
}
const img = new Image();
img.onload = () => {
const ratio = img.naturalWidth / img.naturalHeight;
@@ -104,7 +98,7 @@ export class HomeComponent implements OnInit {
});
}
};
img.src = cat.wideBanner as string;
img.src = cat.wideBanner;
});
}