From 47787c0b0b846d5f4a057661efdd05d8786032f1 Mon Sep 17 00:00:00 2001
From: Florian Dold <florian.dold@gmail.com>
Date: Mon, 6 Apr 2020 23:32:01 +0530
Subject: make linter less grumpy

---
 src/webex/pages/tip.tsx | 19 +++++++------------
 1 file changed, 7 insertions(+), 12 deletions(-)

(limited to 'src/webex/pages/tip.tsx')

diff --git a/src/webex/pages/tip.tsx b/src/webex/pages/tip.tsx
index 10e12d590..9c797f50d 100644
--- a/src/webex/pages/tip.tsx
+++ b/src/webex/pages/tip.tsx
@@ -22,30 +22,25 @@
  */
 
 import * as React from "react";
-import * as ReactDOM from "react-dom";
 
-import * as i18n from "../i18n";
-
-import { acceptTip, getReserveCreationInfo, getTipStatus } from "../wxApi";
+import { acceptTip, getTipStatus } from "../wxApi";
 
 import {
-  WithdrawDetailView,
   renderAmount,
   ProgressButton,
 } from "../renderHtml";
 
-import * as Amounts from "../../util/amounts";
 import { useState, useEffect } from "react";
 import { TipStatus } from "../../types/walletTypes";
 
-function TipDisplay(props: { talerTipUri: string }) {
+function TipDisplay(props: { talerTipUri: string }): JSX.Element {
   const [tipStatus, setTipStatus] = useState<TipStatus | undefined>(undefined);
   const [discarded, setDiscarded] = useState(false);
   const [loading, setLoading] = useState(false);
   const [finished, setFinished] = useState(false);
 
   useEffect(() => {
-    const doFetch = async () => {
+    const doFetch = async (): Promise<void> => {
       const ts = await getTipStatus(props.talerTipUri);
       setTipStatus(ts);
     };
@@ -53,7 +48,7 @@ function TipDisplay(props: { talerTipUri: string }) {
   }, []);
 
   if (discarded) {
-    return <span>You've discarded the tip.</span>;
+    return <span>You&apos;ve discarded the tip.</span>;
   }
 
   if (finished) {
@@ -64,11 +59,11 @@ function TipDisplay(props: { talerTipUri: string }) {
     return <span>Loading ...</span>;
   }
 
-  const discard = () => {
+  const discard = (): void => {
     setDiscarded(true);
   };
 
-  const accept = async () => {
+  const accept = async (): Promise<void> => {
     setLoading(true);
     await acceptTip(tipStatus.tipId);
     setFinished(true);
@@ -100,7 +95,7 @@ function TipDisplay(props: { talerTipUri: string }) {
   );
 }
 
-export function createTipPage() {
+export function createTipPage(): JSX.Element {
     const url = new URL(document.location.href);
     const talerTipUri = url.searchParams.get("talerTipUri");
     if (typeof talerTipUri !== "string") {
-- 
cgit v1.2.3

