aboutsummaryrefslogtreecommitdiff
path: root/src/webex/pages/tip.tsx
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2020-04-07 13:37:32 +0530
committerFlorian Dold <florian.dold@gmail.com>2020-04-07 13:37:32 +0530
commitfb2e2f89935240666de66e4b2c11125cb3b2943d (patch)
tree7b7e148e6cce7bf7639a5e35102f5269f5920ab5 /src/webex/pages/tip.tsx
parent1471aae8927c20d646cc2aa5ab0e20c1a7f2c0ca (diff)
downloadwallet-core-fb2e2f89935240666de66e4b2c11125cb3b2943d.tar.xz
more lint fixes
Diffstat (limited to 'src/webex/pages/tip.tsx')
-rw-r--r--src/webex/pages/tip.tsx19
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&apos;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} />;
}