Skip to content

Commit

Permalink
fix display of tangram
Browse files Browse the repository at this point in the history
  • Loading branch information
kcinay055679 committed Nov 15, 2024
1 parent e4668ad commit 20eb4e6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<img alt="okr-logo" ngSrc="{{ this.trianglesSrc$ | async }}" width="274" height="140" priority />
<img alt="okr-logo" ngSrc="{{ this.trianglesSrc$ | async }}" width="274" height="140" />
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
import { Component } from '@angular/core';
import { ConfigService } from '../../../services/config.service';
import { map, Observable } from 'rxjs';
import { BehaviorSubject, map, Observable, Subject, Subscription } from 'rxjs';

@Component({
selector: 'app-okr-tangram',
templateUrl: 'okr-tangram.component.html',
styleUrl: 'okr-tangram.component.scss',
})
export class OkrTangramComponent {
private readonly DEFAULT_TRIANGLE_SRC = 'assets/images/empty.svg';
private readonly defaultTrianglesSrc = 'assets/images/empty.svg';
trianglesSrc$ = new Observable<string>();

constructor(private readonly configService: ConfigService) {
this.trianglesSrc$ = this.configService.config$.pipe(
map((config) => config.triangles || this.DEFAULT_TRIANGLE_SRC),
);
this.trianglesSrc$ = this.configService.config$.pipe(map((config) => config.triangles || this.defaultTrianglesSrc));
}
}

0 comments on commit 20eb4e6

Please sign in to comment.