2
0

♻️ Fix eslint warnings

This commit is contained in:
Baptiste Arnaud
2023-02-23 07:48:11 +01:00
parent 889e6a4f7e
commit be4c8e0760
4 changed files with 20 additions and 20 deletions

View File

@ -103,6 +103,13 @@ const Input = (props: {
const getPrefilledValue = () =>
props.isInputPrefillEnabled ? props.block.prefilledValue : undefined
const submitPaymentSuccess = () =>
props.onSubmit({
value:
(props.block.options as PaymentInputOptions).labels.success ??
'Success',
})
return (
<Switch>
<Match when={props.block.type === InputBlockType.TEXT}>
@ -182,13 +189,7 @@ const Input = (props: {
...props.block.runtimeOptions,
} as PaymentInputOptions & RuntimeOptions
}
onSuccess={() =>
props.onSubmit({
value:
(props.block.options as PaymentInputOptions).labels.success ??
'Success',
})
}
onSuccess={submitPaymentSuccess}
/>
</Match>
</Switch>