Skip to content

Commit

Permalink
Hide current limit if not set nor adjustable
Browse files Browse the repository at this point in the history
  • Loading branch information
pkronstrom committed Apr 1, 2019
1 parent 7383667 commit 8bcdd4d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/app/components/InverterCharger/InputLimit.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ export const InputLimit = ({ isAdjustable, currentLimit, onChangeInputLimitClick
return (
<div className="metric__current-input-limit">
<div className="input-limit-header__wrapper">
<div className="text--large metric__current-input-limit__limit">{currentLimit}</div>
{!isAdjustable && <div class="text--subtitle">Input Limit</div>}
{currentLimit !== "--" && <div className="text--large metric__current-input-limit__limit">{currentLimit}</div>}
{!isAdjustable && currentLimit !== "--" && <div className="text--subtitle">Input Limit</div>}
</div>

{isAdjustable !== 0 && (
Expand All @@ -42,7 +42,7 @@ class InputLimitWithData extends Component {
return (
<InputLimit
currentLimit={formatNumber({ value: topics.currentLimit, unit: "A" })}
isAdjustable={topics.currentLimitIsAdjustable}
isAdjustable={topics.currentLimitIsAdjustable || 0}
onChangeInputLimitClicked={onChangeInputLimitClicked}
/>
)
Expand Down

0 comments on commit 8bcdd4d

Please sign in to comment.