diff options
author | Florian Dold <florian.dold@gmail.com> | 2020-04-07 13:37:32 +0530 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2020-04-07 13:37:32 +0530 |
commit | fb2e2f89935240666de66e4b2c11125cb3b2943d (patch) | |
tree | 7b7e148e6cce7bf7639a5e35102f5269f5920ab5 /src/webex/pages/tip.tsx | |
parent | 1471aae8927c20d646cc2aa5ab0e20c1a7f2c0ca (diff) | |
download | wallet-core-fb2e2f89935240666de66e4b2c11125cb3b2943d.tar.xz |
more lint fixes
Diffstat (limited to 'src/webex/pages/tip.tsx')
-rw-r--r-- | src/webex/pages/tip.tsx | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/src/webex/pages/tip.tsx b/src/webex/pages/tip.tsx index 9c797f50d..4a1d3743a 100644 --- a/src/webex/pages/tip.tsx +++ b/src/webex/pages/tip.tsx @@ -25,10 +25,7 @@ import * as React from "react"; import { acceptTip, getTipStatus } from "../wxApi"; -import { - renderAmount, - ProgressButton, -} from "../renderHtml"; +import { renderAmount, ProgressButton } from "../renderHtml"; import { useState, useEffect } from "react"; import { TipStatus } from "../../types/walletTypes"; @@ -45,7 +42,7 @@ function TipDisplay(props: { talerTipUri: string }): JSX.Element { setTipStatus(ts); }; doFetch(); - }, []); + }, [props.talerTipUri]); if (discarded) { return <span>You've discarded the tip.</span>; @@ -96,11 +93,11 @@ function TipDisplay(props: { talerTipUri: string }): JSX.Element { } export function createTipPage(): JSX.Element { - const url = new URL(document.location.href); - const talerTipUri = url.searchParams.get("talerTipUri"); - if (typeof talerTipUri !== "string") { - throw Error("talerTipUri must be a string"); - } + const url = new URL(document.location.href); + const talerTipUri = url.searchParams.get("talerTipUri"); + if (typeof talerTipUri !== "string") { + throw Error("talerTipUri must be a string"); + } - return <TipDisplay talerTipUri={talerTipUri} />; + return <TipDisplay talerTipUri={talerTipUri} />; } |