Skip to content

Commit

Permalink
fix: no need for resize for mobile app
Browse files Browse the repository at this point in the history
  • Loading branch information
SahilK-027 committed Dec 17, 2024
1 parent ee3d1f9 commit 0a341a8
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Component, HostListener, Input, OnInit } from '@angular/core';
import { Component, Input, OnInit } from '@angular/core';
import { Params, Router } from '@angular/router';
import { PlatformCorporateCardDetail } from 'src/app/core/models/platform-corporate-card-detail.model';
import { OrgSettingsService } from 'src/app/core/services/org-settings.service';
Expand All @@ -25,11 +25,6 @@ export class CardDetailComponent implements OnInit {
// To track if the screen is small (320px or below)
isSmallScreen = false;

Check failure on line 26 in src/app/shared/components/spent-cards/card-detail/card-detail.component.ts

View workflow job for this annotation

GitHub Actions / Run linters

Member isSmallScreen should be declared before all public constructor definitions

@HostListener('window:resize', ['$event'])
onResize(): void {
this.isSmallScreen = window.innerWidth <= 320;
}

goToExpensesPage(state: string, cardDetail: PlatformCorporateCardDetail): void {
if (state === 'incompleteExpenses' && cardDetail.stats.totalDraftTxns && cardDetail.stats.totalDraftTxns > 0) {
const queryParams: Params = {
Expand All @@ -54,6 +49,7 @@ export class CardDetailComponent implements OnInit {
}

ngOnInit(): void {
this.cardDetail.stats.totalAmountValue += 898989898;
this.isSmallScreen = window.innerWidth <= 320;
}
}

0 comments on commit 0a341a8

Please sign in to comment.