1
0
Fork 0

fix(lab): Rewrote chained ternary

This commit is contained in:
Joost De Cock 2022-02-13 21:31:11 +01:00
parent cbdde9d236
commit 70bec9fa51

View file

@ -70,12 +70,8 @@ const MeasurementInput = ({ m, gist, app, updateMeasurements }) => {
${isValid() === true && 'border-success text-neutral-content'} ${isValid() === true && 'border-success text-neutral-content'}
${isValid() === null && 'border-base-200 text-base-content'} ${isValid() === null && 'border-base-200 text-base-content'}
`}> `}>
{isValid() === null {(isValid() === true) && '👍'}
? '' {(isValid() === false) && '🤔'}
: valid
? '👍'
: '🤔'
}
</span> </span>
<span className={` <span className={`
${valid === false && 'bg-error text-neutral-content'} ${valid === false && 'bg-error text-neutral-content'}