diff --git a/src/FilterLists.Web.V2/src/components/ListInfoDrawer.tsx b/src/FilterLists.Web.V2/src/components/ListInfoDrawer.tsx index db10f89c0..54fe5df6f 100644 --- a/src/FilterLists.Web.V2/src/components/ListInfoDrawer.tsx +++ b/src/FilterLists.Web.V2/src/components/ListInfoDrawer.tsx @@ -11,7 +11,7 @@ import { Description } from './Description'; import { LanguageCloud } from './languageCloud'; import { LicenseTag } from './LicenseTag'; import { LinkButton } from './LinkButton'; -import { SubscribeButton } from './SubscribeButton'; +import { SubscribeButtons } from './SubscribeButtons'; import { TagCloud } from './tagCloud'; interface Props { @@ -64,7 +64,7 @@ export class ListInfoDrawer extends React.Component - {this.props.list.viewUrl && } + {this.props.list.viewUrl && } {this.props.list.viewUrl && { +export const SubscribeButtons = (props: Props) => + <> + + + ; + +const PrimaryButton = (props: Props) => { const buttonProps = buildButtonProps(props.name, props.viewUrl); return ( - <> - - - + ) }; -const PrimaryButton = (props: [ButtonProps, boolean]) => - ; - const MirrorButtons = (props: Props) => <> {props.viewUrlMirrors && props.viewUrlMirrors.length - ? props.viewUrlMirrors.map((viewUrlMirror: string, i: number) => { - const buttonProps = buildButtonProps(props.name, viewUrlMirror); - return - }) + ? props.viewUrlMirrors.map((viewUrlMirror: string, i: number) => + + ) : null} ; +interface MirrorButtonProps { + index: number; + viewUrlMirror: string; + name: string; +} + +const MirrorButton = (props: MirrorButtonProps) => { + const buttonProps = buildButtonProps(props.name, props.viewUrlMirror); + return ( + + ) +} + const buildButtonProps = (name: string, viewUrl: string): [ButtonProps, boolean] => { let type: ButtonType = "primary"; let disabled: boolean = false;