refactor(event): replace bootstrap notices with claimed notices
This commit is contained in:
@@ -1,9 +1,8 @@
|
||||
import { DOCUMENT, isPlatformBrowser } from '@angular/common';
|
||||
import { Component, PLATFORM_ID, computed, effect, inject } from '@angular/core';
|
||||
import { DOCUMENT } from '@angular/common';
|
||||
import { Component, computed, effect, inject } from '@angular/core';
|
||||
import { Title } from '@angular/platform-browser';
|
||||
import { RouterOutlet } from '@angular/router';
|
||||
|
||||
import { EventDateNoticeService } from './core/services/event-date-notice.service';
|
||||
import { TenantService } from './core/services/tenant.service';
|
||||
import { DEFAULT_TENANT_BRANDING } from './core/services/tenant-ssr-cache.store';
|
||||
import { GlobalLoadingComponent } from './shared/components/global-loading/global-loading.component';
|
||||
@@ -59,11 +58,8 @@ function hexToRgb(hex: string): string {
|
||||
})
|
||||
export class App {
|
||||
private readonly tenantService = inject(TenantService);
|
||||
private readonly eventDateNoticeService = inject(EventDateNoticeService);
|
||||
private readonly document = inject(DOCUMENT);
|
||||
private readonly title = inject(Title);
|
||||
private readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));
|
||||
private notifiedTenantCode: string | null = null;
|
||||
|
||||
constructor() {
|
||||
effect(() => {
|
||||
@@ -82,11 +78,6 @@ export class App {
|
||||
}
|
||||
|
||||
favicon.setAttribute('href', faviconHref);
|
||||
|
||||
if (this.isBrowser && tenant && this.notifiedTenantCode !== tenant.codigo) {
|
||||
this.notifiedTenantCode = tenant.codigo;
|
||||
this.eventDateNoticeService.show(tenant.event?.date_notices ?? []);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user