From 5618598bad3979b45095a87b8e7644d969925481 Mon Sep 17 00:00:00 2001 From: "Collin M. Barrett" Date: Sun, 20 Sep 2020 15:17:26 -0500 Subject: [PATCH] =?UTF-8?q?fix(web):=20=F0=9F=90=9B=20show=20Subscribe=20a?= =?UTF-8?q?nd=20View=20buttons=20for=20all=20mirrors=20in=20info=20drawer?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit closes #1958 --- web/src/components/SubscribeButtons.tsx | 22 ++++++-- web/src/components/ViewButtons.tsx | 56 +++++++++++++++++++ .../listInfoDrawer/ListInfoDrawer.tsx | 18 ++---- 3 files changed, 79 insertions(+), 17 deletions(-) create mode 100644 web/src/components/ViewButtons.tsx diff --git a/web/src/components/SubscribeButtons.tsx b/web/src/components/SubscribeButtons.tsx index f5072e9f1..256b7a887 100644 --- a/web/src/components/SubscribeButtons.tsx +++ b/web/src/components/SubscribeButtons.tsx @@ -15,8 +15,12 @@ export const SubscribeButtons = (props: Props) => name={props.name} viewUrl={props.viewUrls[0]} text="Subscribe" + isPrimary={true} + /> + - ) : null; @@ -34,6 +38,7 @@ const MirrorButtons = (props: MirrorButtonsProps) => ( name={props.name} viewUrl={viewUrlMirror} text={`Subscribe (Mirror ${i + 1})`} + isPrimary={false} /> )) : null} @@ -44,10 +49,15 @@ interface SubscribeButtonProps { name: string; viewUrl: string; text: string; + isPrimary: boolean; } const SubscribeButton = (props: SubscribeButtonProps) => { - const buttonProps = buildButtonProps(props.name, props.viewUrl); + const buttonProps = buildButtonProps( + props.name, + props.viewUrl, + props.isPrimary + ); return (