Enable use of <>-fragment (update dependencies).

Update style of solution-AND-usermarked fields.
This commit is contained in:
Manuel Friedli 2023-04-16 02:34:11 +02:00
parent 4b300004b9
commit ae5a58acf8
6 changed files with 13766 additions and 9763 deletions

View file

@ -24,14 +24,8 @@ export default function ValidatingInputNumberField({
}
onChange(validation.value);
};
let errorComponent;
if (!!error) {
errorComponent = <span>{error}</span>;
} else {
errorComponent = <span/>;
}
return (
<span>
<>
<label htmlFor={id}>{label}: </label>
<input id={id}
type={"number"}
@ -41,7 +35,7 @@ export default function ValidatingInputNumberField({
max={constraints.max || null}
disabled={disabled}
/>
{errorComponent}
</span>
{!!error && <span>{error}</span>}
</>
);
}