diff options
author | Sebastian <sebasjm@gmail.com> | 2022-03-29 09:58:06 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2022-03-29 10:04:33 -0300 |
commit | 3dd1047b085fa7795f322c5829f39208465bff13 (patch) | |
tree | 19340ca9420466e7059849dbf7013901733c0fde /packages/taler-wallet-webextension/src/cta | |
parent | cb18b9813e5df6e315dfb1827f5f7cf304977390 (diff) | |
download | wallet-core-3dd1047b085fa7795f322c5829f39208465bff13.tar.xz |
added react eslint and fix most of the warns
Diffstat (limited to 'packages/taler-wallet-webextension/src/cta')
7 files changed, 8 insertions, 10 deletions
diff --git a/packages/taler-wallet-webextension/src/cta/Deposit.tsx b/packages/taler-wallet-webextension/src/cta/Deposit.tsx index 3b6b798ee..7ade50e2c 100644 --- a/packages/taler-wallet-webextension/src/cta/Deposit.tsx +++ b/packages/taler-wallet-webextension/src/cta/Deposit.tsx @@ -33,7 +33,6 @@ import { NotificationType, PreparePayResult, PreparePayResultType, - Translate, } from "@gnu-taler/taler-util"; import { TalerError } from "@gnu-taler/taler-wallet-core"; import { Fragment, h, VNode } from "preact"; diff --git a/packages/taler-wallet-webextension/src/cta/Pay.tsx b/packages/taler-wallet-webextension/src/cta/Pay.tsx index 4d1758e2e..c2f352661 100644 --- a/packages/taler-wallet-webextension/src/cta/Pay.tsx +++ b/packages/taler-wallet-webextension/src/cta/Pay.tsx @@ -48,7 +48,6 @@ import { QR } from "../components/QR.js"; import { ButtonSuccess, Link, - LinkPrimary, LinkSuccess, SmallLightText, SubTitle, diff --git a/packages/taler-wallet-webextension/src/cta/TermsOfServiceSection.tsx b/packages/taler-wallet-webextension/src/cta/TermsOfServiceSection.tsx index 0320a8c15..b49627689 100644 --- a/packages/taler-wallet-webextension/src/cta/TermsOfServiceSection.tsx +++ b/packages/taler-wallet-webextension/src/cta/TermsOfServiceSection.tsx @@ -37,7 +37,7 @@ export function TermsOfServiceSection({ <section> <WarningText> <i18n.Translate> - Exchange doesn't have terms of service + Exchange doesn't have terms of service </i18n.Translate> </WarningText> </section> @@ -51,7 +51,7 @@ export function TermsOfServiceSection({ <section> <WarningText> <i18n.Translate> - Exchange doesn't have terms of service + Exchange doesn't have terms of service </i18n.Translate> </WarningText> </section> diff --git a/packages/taler-wallet-webextension/src/cta/Tip.stories.tsx b/packages/taler-wallet-webextension/src/cta/Tip.stories.tsx index 9637be087..debf64aa3 100644 --- a/packages/taler-wallet-webextension/src/cta/Tip.stories.tsx +++ b/packages/taler-wallet-webextension/src/cta/Tip.stories.tsx @@ -19,7 +19,7 @@ * @author Sebastian Javier Marchano (sebasjm) */ -import { AbsoluteTime, TalerProtocolTimestamp } from "@gnu-taler/taler-util"; +import { TalerProtocolTimestamp } from "@gnu-taler/taler-util"; import { createExample } from "../test-utils.js"; import { View as TestedComponent } from "./Tip.js"; diff --git a/packages/taler-wallet-webextension/src/cta/Tip.tsx b/packages/taler-wallet-webextension/src/cta/Tip.tsx index 2725140b0..071243f31 100644 --- a/packages/taler-wallet-webextension/src/cta/Tip.tsx +++ b/packages/taler-wallet-webextension/src/cta/Tip.tsx @@ -101,7 +101,7 @@ export function TipPage({ talerTipUri }: Props): VNode { doFetch(); }, [talerTipUri, updateCounter]); - const doAccept = async () => { + const doAccept = async (): Promise<void> => { if (!prepareTipResult) { return; } @@ -109,7 +109,7 @@ export function TipPage({ talerTipUri }: Props): VNode { setUpdateCounter(updateCounter + 1); }; - const doIgnore = () => { + const doIgnore = (): void => { setTipIgnored(true); }; @@ -124,7 +124,7 @@ export function TipPage({ talerTipUri }: Props): VNode { if (tipIgnored) { return ( <span> - <i18n.Translate>You've ignored the tip.</i18n.Translate> + <i18n.Translate>You've ignored the tip.</i18n.Translate> </span> ); } diff --git a/packages/taler-wallet-webextension/src/cta/Withdraw.tsx b/packages/taler-wallet-webextension/src/cta/Withdraw.tsx index feac2cebb..67a910397 100644 --- a/packages/taler-wallet-webextension/src/cta/Withdraw.tsx +++ b/packages/taler-wallet-webextension/src/cta/Withdraw.tsx @@ -104,7 +104,7 @@ export function View({ {}, ); - async function doWithdrawAndCheckError() { + async function doWithdrawAndCheckError(): Promise<void> { try { setConfirmDisabled(true); await onWithdraw(); diff --git a/packages/taler-wallet-webextension/src/cta/return-coins.tsx b/packages/taler-wallet-webextension/src/cta/return-coins.tsx index d4ea06361..ae2bb07b6 100644 --- a/packages/taler-wallet-webextension/src/cta/return-coins.tsx +++ b/packages/taler-wallet-webextension/src/cta/return-coins.tsx @@ -25,7 +25,7 @@ import { useTranslationContext } from "../context/translation.js"; /** * Imports. */ -export function createReturnCoinsPage(): VNode { +export function CreateReturnCoinsPage(): VNode { const { i18n } = useTranslationContext(); return ( <span> |