Skip to content

Commit

Permalink
lint(pwa/ff): reported issues
Browse files Browse the repository at this point in the history
  • Loading branch information
MM25Zamanian authored and alimd committed Dec 20, 2022
1 parent 2597238 commit ee9118c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export class PageFlightFinder extends AlwatrElement {
];

private __jobList: Array<Job> = [];
private __relativeTime: string = '';
private __relativeTime = '';

static jobDataSignal = new SignalInterface('job-data');
static jobAddSignal = new SignalInterface('job-add');
Expand All @@ -72,8 +72,8 @@ export class PageFlightFinder extends AlwatrElement {
const relativeTimeObject = getHumanTime(now - (jobList.meta?.lastUpdated ?? now));

this.__relativeTime = PageFlightFinder.relativeTimeFormatter.format(
-Math.floor(relativeTimeObject.humanTime),
relativeTimeObject.units
-Math.floor(relativeTimeObject.humanTime),
relativeTimeObject.units,
);
this.requestUpdate();
});
Expand Down
5 changes: 3 additions & 2 deletions uniquely/flight-finder-pwa/src/director/job-data.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {createLogger} from '@alwatr/logger';
import {fetch} from '@alwatr/fetch';
import {createLogger} from '@alwatr/logger';
import {SignalInterface} from '@alwatr/signal';

import {showToastSignal} from './toast.js';
Expand Down Expand Up @@ -43,7 +43,8 @@ jobDataSignal.setProvider(async () => {
});

await _dispatchJobList(response);
} catch (error) {
}
catch (error) {
logger.error('jobListProvider', 'fetch_failed', error);

showToastSignal.dispatch({
Expand Down
3 changes: 2 additions & 1 deletion uniquely/flight-finder-pwa/src/util/human-time.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ export function getHumanTime(timestamp: number): {
if (time > 1000 * 60 * 60) {
humanTime = time / (1000 * 60 * 60);
units = 'hours';
} else if (time > 1000 * 60) {
}
else if (time > 1000 * 60) {
humanTime = time / (1000 * 60);
units = 'minutes';
}
Expand Down

0 comments on commit ee9118c

Please sign in to comment.