Skip to content

Commit

Permalink
Merge cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
ayangster committed Sep 27, 2023
1 parent df661d1 commit 3243259
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 12 deletions.
10 changes: 8 additions & 2 deletions src/calculator-form.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,13 @@ const HOUSEHOLD_SIZE_OPTIONS: OptionParam[] = [1, 2, 3, 4, 5, 6, 7, 8].map(
);

export const formTemplate = (
[zip, ownerStatus, householdIncome, taxFiling, householdSize]: Array<string>,
[
zip,
ownerStatus,
householdIncome,
taxFiling,
householdSize,
]: Array<string>,
projects: Array<string>,
showProjectField: boolean,
onSubmit: (e: SubmitEvent) => void,
Expand Down Expand Up @@ -206,7 +212,7 @@ export const formTemplate = (
</label>
</div>
<div>
<button class="calculate" type="submit">
<button class="primary" type="submit">
Calculate! ${downIcon(18, 18)}
</button>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/icons.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { html, svg } from 'lit';
import { html } from 'lit';

// FIXME: does this need to be nested like this?
export const downIcon = (w: number, h: number) => html`<svg
Expand Down
16 changes: 8 additions & 8 deletions src/state-calculator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -248,14 +248,14 @@ export class RewiringAmericaStateCalculator extends LitElement {
this._utilitiesTask.status !== TaskStatus.COMPLETE
? nothing
: stateIncentivesTemplate(
results,
this.projects,
newOtherSelection =>
(this.selectedOtherTab = newOtherSelection),
newSelection => (this.selectedProjectTab = newSelection),
this.selectedOtherTab,
this.selectedProjectTab,
),
results,
this.projects,
newOtherSelection =>
(this.selectedOtherTab = newOtherSelection),
newSelection => (this.selectedProjectTab = newSelection),
this.selectedOtherTab,
this.selectedProjectTab,
),
error: errorTemplate,
})}
${CALCULATOR_FOOTER}
Expand Down
3 changes: 2 additions & 1 deletion src/state-incentive-details.ts
Original file line number Diff line number Diff line change
Expand Up @@ -440,5 +440,6 @@ export const stateIncentivesTemplate = (
// If a nonexistent tab is selected, pretend the first one is selected.
otherTabs.includes(selectedOtherTab) ? selectedOtherTab : otherTabs[0],
onOtherTabSelected,
)}`;
)}
${authorityLogosTemplate(response)}`;
};

0 comments on commit 3243259

Please sign in to comment.