Skip to content

Commit

Permalink
hotfix/713 update banner for mobile (#3669)
Browse files Browse the repository at this point in the history
  • Loading branch information
TranTrungTien authored Aug 16, 2024
1 parent 298bce1 commit de8de9a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
4 changes: 4 additions & 0 deletions src/app/core/data-services/environment.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,10 @@ export class EnvironmentService {
return _.get(this.configValue, 'image.banner');
}

get mobileBanner() {
return _.get(this.configValue, 'image.mobileBanner');
}

get ipfsDomain() {
return _.get(this.configValue, 'api.ipfsDomain');
}
Expand Down
12 changes: 5 additions & 7 deletions src/app/pages/dashboard/dashboard.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,7 @@ import { WalletService } from 'src/app/core/services/wallet.service';
import { TableTemplate } from '../../../app/core/models/common.model';
import { BlockService } from '../../../app/core/services/block.service';
import { TransactionService } from '../../../app/core/services/transaction.service';
import {
CHART_RANGE,
NUMBER_6_DIGIT,
PAGE_EVENT,
TIMEOUT_ERROR,
} from '../../core/constants/common.constant';
import { CHART_RANGE, NUMBER_6_DIGIT, PAGE_EVENT, TIMEOUT_ERROR } from '../../core/constants/common.constant';
import { Globals, convertDataBlock, convertDataTransactionSimple } from '../../global/global';
import { CHART_CONFIG, DASHBOARD_AREA_SERIES_CHART_OPTIONS, DASHBOARD_CHART_OPTIONS } from './dashboard-chart-options';
import BigNumber from 'bignumber.js';
Expand Down Expand Up @@ -61,7 +56,7 @@ export class DashboardComponent implements OnInit, AfterViewInit, OnDestroy {

denom = this.environmentService.chainInfo.currencies[0].coinDenom;
coinInfo = this.environmentService.chainInfo.currencies[0];
bannerList = this.environmentService.banner;
bannerList = [];
coingeckoCoinId = this.environmentService.coingecko.ids[0];
nativeName = this.environmentService.environment.nativeName;

Expand Down Expand Up @@ -139,6 +134,9 @@ export class DashboardComponent implements OnInit, AfterViewInit, OnDestroy {
this.getListTransaction(latestHeight);
}
});

if (!this.isMobileMatched) this.bannerList = this.environmentService.banner || [];
else this.bannerList = this.environmentService.mobileBanner || [];
}

ngOnDestroy(): void {
Expand Down

0 comments on commit de8de9a

Please sign in to comment.