Skip to content

Commit

Permalink
fix(ff-pwa): render issues (#518)
Browse files Browse the repository at this point in the history
  • Loading branch information
alimd authored Dec 18, 2022
2 parents 26b9748 + 81d4c7e commit 79f7659
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion uniquely/flight-finder-pwa/robots.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
User-agent: *
Allow: /
Disallow: /
11 changes: 6 additions & 5 deletions uniquely/flight-finder-pwa/src/component/page-flight-finder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {l10n} from '@alwatr/i18n';
import {SignalInterface} from '@alwatr/signal';
import {modalController} from '@ionic/core';
import {css, html} from 'lit';
import {customElement, state} from 'lit/decorators.js';
import {customElement} from 'lit/decorators.js';
import {map} from 'lit/directives/map.js';

import ionNormalize from '../style/ionic.normalize.js';
Expand Down Expand Up @@ -50,7 +50,7 @@ export class PageFlightFinder extends AlwatrElement {
`,
];

@state() private __jobList: Array<Job> = [];
private __jobList: Array<Job> = [];

static jobListSignal = new SignalInterface('job-list');
static jobAddSignal = new SignalInterface('job-add');
Expand All @@ -64,6 +64,7 @@ export class PageFlightFinder extends AlwatrElement {

PageFlightFinder.jobListSignal.addListener((jobList) => {
this.__jobList = jobList;
this.requestUpdate();
});
}
override render(): TemplateResult {
Expand All @@ -89,16 +90,16 @@ export class PageFlightFinder extends AlwatrElement {
}

private __renderAirlineListCard(): TemplateResult {
const airlineItemList = map(this.__jobList, (airline) => html` <job-item .job=${airline}></job-item> `);

return html`
<ion-card class="job__list">
<ion-card-header>
<ion-card-title>${l10n.localize('search_list')}</ion-card-title>
<ion-card-subtitle>۵ ${l10n.localize('seconds_ago')}</ion-card-subtitle>
</ion-card-header>
<ion-list lines="full"> ${airlineItemList} </ion-list>
<ion-list lines="full">
${map(this.__jobList, (airline) => html`<job-item .job=${airline}></job-item>`)}
</ion-list>
</ion-card>
`;
}
Expand Down

0 comments on commit 79f7659

Please sign in to comment.