Skip to content

Commit

Permalink
Merge branch 'fix/currency-symbol' into 'develop'
Browse files Browse the repository at this point in the history
Fix/currency symbol

See merge request papers/airgap/airgap-common-components!102
  • Loading branch information
godenzim committed Nov 8, 2021
2 parents b8500a0 + 4e3559e commit 899bfc3
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 10 deletions.
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.0.21-beta.7",
"version": "0.0.21-beta.8",
"packages": [
"packages/*"
],
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@airgap/angular-core",
"version": "0.0.21-beta.7",
"version": "0.0.21-beta.8",
"publishConfig": {
"access": "public"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AfterViewInit, Component, Input, OnChanges } from '@angular/core'
import { AfterViewInit, Component, Input, OnChanges, SimpleChanges } from '@angular/core'
import { UIResource, UIResourceStatus } from '../../../public-api'

const DEFAULT_SYMBOL_URL = './assets/symbols/generic-coin.svg'
Expand All @@ -11,17 +11,23 @@ const DEFAULT_SYMBOL_URL = './assets/symbols/generic-coin.svg'
export class CurrencySymbolComponent implements AfterViewInit, OnChanges {
@Input()
public symbol: string | undefined

public symbolAsset: UIResource<string> = {
status: UIResourceStatus.IDLE,
value: DEFAULT_SYMBOL_URL
}

public ngAfterViewInit(): void {
this.loadImage()
}

public ngOnChanges(): void {

public ngOnChanges(changes: SimpleChanges): void {
if (changes.symbol.previousValue !== changes.symbol.currentValue) {
this.symbolAsset = {
status: UIResourceStatus.IDLE,
value: this.symbolAsset.value
}
}
this.loadImage()
}

Expand Down
2 changes: 1 addition & 1 deletion packages/ngrx/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/ngrx/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@airgap/angular-ngrx",
"version": "0.0.21-beta.7",
"version": "0.0.21-beta.8",
"publishConfig": {
"access": "public"
},
Expand Down

0 comments on commit 899bfc3

Please sign in to comment.