Skip to content

Commit

Permalink
Fix minor issues (warning, and default state) in UI elements in House…
Browse files Browse the repository at this point in the history
…Component.tsx

Signed-off-by: Giovanni Baratta <[email protected]>
  • Loading branch information
giovannibaratta committed May 18, 2024
1 parent 8345278 commit 72b1b41
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/components/HouseComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -288,22 +288,23 @@ export const HouseComponent: React.FC<HouseComponentProps> = () => {
{agencyCostType === "variable" && (
<PercentageInputField
label="Variable parcel"
value={variableAgencyCostPercentage}
value={variableAgencyCostPercentage ?? ""}
onValueChange={handleVariableAgencyCostPercentageChange}
/>
)}
{agencyCostType === "fixed" && (
<CurrencyInputField
label="Agency Costs"
value={fixedAgencyCost}
value={fixedAgencyCost ?? ""}
onValueChange={handleFixedAgencyCostChange}
inputProps={{step: AGENCY_COST_STEP_INCREMENT}}
/>
)}
<FormGroup>
<FormControlLabel control={<Switch defaultChecked onChange={handleAgencyCostsIncludeTaxChange}
value={agencyCostsIncludeTax} />}
label="Include taxes (VAT, ...)" />
<FormControlLabel
control={<Switch checked={agencyCostsIncludeTax} onChange={handleAgencyCostsIncludeTaxChange}
value={agencyCostsIncludeTax} />}
label="Include taxes (VAT, ...)" />
</FormGroup>
</Container>
</Paper>
Expand Down

0 comments on commit 72b1b41

Please sign in to comment.