From 71a933346a730aa923775340ec6ddf544891b6bc Mon Sep 17 00:00:00 2001 From: "Collin M. Barrett" Date: Mon, 5 Aug 2019 20:49:54 -0500 Subject: [PATCH] explicitly define return types --- src/FilterLists.Web.V2/src/shared/SubscribeButton.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/FilterLists.Web.V2/src/shared/SubscribeButton.tsx b/src/FilterLists.Web.V2/src/shared/SubscribeButton.tsx index f03f408dd..52ba6b3f6 100644 --- a/src/FilterLists.Web.V2/src/shared/SubscribeButton.tsx +++ b/src/FilterLists.Web.V2/src/shared/SubscribeButton.tsx @@ -1,17 +1,18 @@ import { Button } from 'antd'; import { ButtonProps, ButtonType } from "antd/lib/button"; import * as React from "react"; +import { JSXElement } from '@babel/types'; interface Props { name: string; viewUrl: string; }; -export const SubscribeButton = (props: Props) => props.viewUrl +export const SubscribeButton = (props: Props): JSX.Element | null => props.viewUrl ? : null; -const buildButtonProps = (props: Props) => { +const buildButtonProps = (props: Props): ButtonProps => { let type: ButtonType = "primary"; const hrefLocation = `${encodeURIComponent(props.viewUrl)}`;