From fb2e2f89935240666de66e4b2c11125cb3b2943d Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Tue, 7 Apr 2020 13:37:32 +0530 Subject: more lint fixes --- src/webex/pages/tip.tsx | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) (limited to 'src/webex/pages/tip.tsx') 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 You've discarded the tip.; @@ -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 ; + return ; } -- cgit v1.2.3