[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-merchant-backoffice] branch master updated: fix linting
From: |
gnunet |
Subject: |
[taler-merchant-backoffice] branch master updated: fix linting |
Date: |
Thu, 27 May 2021 20:33:35 +0200 |
This is an automated email from the git hooks/post-receive script.
sebasjm pushed a commit to branch master
in repository merchant-backoffice.
The following commit(s) were added to refs/heads/master by this push:
new 9d43258 fix linting
9d43258 is described below
commit 9d432586989f992220c047be0df18ef05e4e3d45
Author: Sebastian <sebasjm@gmail.com>
AuthorDate: Thu May 27 15:33:09 2021 -0300
fix linting
---
.../paths/instance/reserves/create/CreatePage.tsx | 20 ++++++++++----------
.../instance/reserves/list/AutorizeTipModal.tsx | 4 ++--
.../src/paths/instance/reserves/list/Table.tsx | 3 +--
3 files changed, 13 insertions(+), 14 deletions(-)
diff --git
a/packages/frontend/src/paths/instance/reserves/create/CreatePage.tsx
b/packages/frontend/src/paths/instance/reserves/create/CreatePage.tsx
index a98e665..9eceb32 100644
--- a/packages/frontend/src/paths/instance/reserves/create/CreatePage.tsx
+++ b/packages/frontend/src/paths/instance/reserves/create/CreatePage.tsx
@@ -46,8 +46,8 @@ enum Steps {
}
interface ViewProps {
- step : Steps,
- setCurrentStep: (s:Steps) => void;
+ step: Steps,
+ setCurrentStep: (s: Steps) => void;
reserve: Partial<Entity>;
onBack?: () => void;
submitForm: () => Promise<void>;
@@ -56,7 +56,7 @@ interface ViewProps {
function ViewStep({ step, setCurrentStep, reserve, onBack, submitForm,
setReserve }: ViewProps): VNode {
const i18n = useTranslator()
const [wireMethods, setWireMethods] = useState<Array<string>>([])
- const [exchangeQueryError, setExchangeQueryError] =
useState<string|undefined>(undefined)
+ const [exchangeQueryError, setExchangeQueryError] = useState<string |
undefined>(undefined)
useEffect(() => {
setExchangeQueryError(undefined)
@@ -66,7 +66,7 @@ function ViewStep({ step, setCurrentStep, reserve, onBack,
submitForm, setReserv
case Steps.EXCHANGE: {
const errors: FormErrors<Entity> = {
initial_balance: !reserve.initial_balance ? 'cannot be empty' :
!(parseInt(reserve.initial_balance.split(':')[1], 10) > 0) ? i18n`it should be
greater than 0` : undefined,
- exchange_url: !reserve.exchange_url ? i18n`cannot be empty` :
!URL_REGEX.test(reserve.exchange_url) ? i18n`must be a valid URL` :
!!exchangeQueryError ? exchangeQueryError : undefined,
+ exchange_url: !reserve.exchange_url ? i18n`cannot be empty` :
!URL_REGEX.test(reserve.exchange_url) ? i18n`must be a valid URL` :
!exchangeQueryError ? undefined : exchangeQueryError,
}
const hasErrors = Object.keys(errors).some(k => (errors as any)[k] !==
undefined)
@@ -87,7 +87,7 @@ function ViewStep({ step, setCurrentStep, reserve, onBack,
submitForm, setReserv
})
setWireMethods(wireMethods)
setCurrentStep(Steps.WIRE_METHOD)
- return
+ return
}).catch((r: any) => {
setExchangeQueryError(r.message)
})
@@ -106,7 +106,7 @@ function ViewStep({ step, setCurrentStep, reserve, onBack,
submitForm, setReserv
<FormProvider<Entity> object={reserve} errors={errors}
valueHandler={setReserve}>
<InputCurrency<Entity> name="initial_balance" label={i18n`Initial
balance`} readonly />
<Input<Entity> name="exchange_url" label={i18n`Exchange URL`}
readonly />
- <InputSelector<Entity> name="wire_method" label={i18n`Wire method`}
values={wireMethods} placeholder={i18n`Select one wire method`}/>
+ <InputSelector<Entity> name="wire_method" label={i18n`Wire method`}
values={wireMethods} placeholder={i18n`Select one wire method`} />
</FormProvider>
<div class="buttons is-right mt-5">
{onBack && <button class="button" onClick={() =>
setCurrentStep(Steps.EXCHANGE)} ><Translate>Back</Translate></button>}
@@ -137,12 +137,12 @@ export function CreatePage({ onCreate, onBack }: Props):
VNode {
<div class="tabs is-toggle is-fullwidth is-small">
<ul>
- <li class={currentStep === Steps.EXCHANGE?"is-active":""}>
+ <li class={currentStep === Steps.EXCHANGE ? "is-active" : ""}>
<a style={{ cursor: 'initial' }}>
<span>Set exchange</span>
</a>
</li>
- <li class={currentStep === Steps.WIRE_METHOD?"is-active":""}>
+ <li class={currentStep === Steps.WIRE_METHOD ? "is-active" : ""}>
<a style={{ cursor: 'initial' }}>
<span>Set wire method</span>
</a>
@@ -150,12 +150,12 @@ export function CreatePage({ onCreate, onBack }: Props):
VNode {
</ul>
</div>
- <ViewStep step={currentStep} reserve={reserve}
+ <ViewStep step={currentStep} reserve={reserve}
setCurrentStep={setCurrentStep}
setReserve={setReserve}
submitForm={submitForm}
onBack={onBack}
- />
+ />
</div>
<div class="column" />
</div>
diff --git
a/packages/frontend/src/paths/instance/reserves/list/AutorizeTipModal.tsx
b/packages/frontend/src/paths/instance/reserves/list/AutorizeTipModal.tsx
index 6f97815..b751791 100644
--- a/packages/frontend/src/paths/instance/reserves/list/AutorizeTipModal.tsx
+++ b/packages/frontend/src/paths/instance/reserves/list/AutorizeTipModal.tsx
@@ -71,8 +71,8 @@ export function AuthorizeTipModal({ onCancel, onConfirm,
tipAuthorized }: Author
return <ConfirmModal description="tip" active onCancel={onCancel}
disabled={hasErrors} onConfirm={validateAndConfirm}>
<FormProvider<State> errors={errors} object={form} valueHandler={setValue}
>
- <InputCurrency<State> name="amount" label={i18n`Amount`}
tooltip={i18n`amount of tip`}/>
- <Input<State> name="justification" label={i18n`Justification`}
inputType="multiline" tooltip={i18n`reason for the tip`}/>
+ <InputCurrency<State> name="amount" label={i18n`Amount`}
tooltip={i18n`amount of tip`} />
+ <Input<State> name="justification" label={i18n`Justification`}
inputType="multiline" tooltip={i18n`reason for the tip`} />
<Input<State> name="next_url" label={i18n`URL after tip`} />
</FormProvider>
diff --git a/packages/frontend/src/paths/instance/reserves/list/Table.tsx
b/packages/frontend/src/paths/instance/reserves/list/Table.tsx
index a21de64..83e4fb8 100644
--- a/packages/frontend/src/paths/instance/reserves/list/Table.tsx
+++ b/packages/frontend/src/paths/instance/reserves/list/Table.tsx
@@ -72,8 +72,7 @@ export function CardTable({ instances, onCreate, onSelect,
onNewTip, onDelete }:
<div class="card has-table">
<header class="card-header">
<p class="card-header-title"><span class="icon"><i class="mdi
mdi-cash" /></span><Translate>Reserves ready</Translate></p>
- <div class="card-header-icon" aria-label="more options">
- </div>
+ <div class="card-header-icon" aria-label="more options" />
</header>
<div class="card-content">
<div class="b-table has-pagination">
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-merchant-backoffice] branch master updated: fix linting,
gnunet <=