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)}`;