mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
viewUrl is always required and should never be null/undefined
This commit is contained in:
parent
3cf55967ce
commit
32e137ec1b
1 changed files with 4 additions and 6 deletions
|
|
@ -13,14 +13,12 @@ interface Props {
|
|||
viewUrlMirrors: string[];
|
||||
};
|
||||
|
||||
export const SubscribeButton = (props: Props): JSX.Element | null =>
|
||||
export const SubscribeButton = (props: Props): JSX.Element =>
|
||||
(props.viewUrlMirrors && props.viewUrlMirrors.length > 0)
|
||||
? <SubscribeButtonDropdown {...props} />
|
||||
: props.viewUrl
|
||||
? <div>
|
||||
<Button className={"single"} size="small" {...buildButtonProps(props.name, props.viewUrl)}>Subscribe</Button>
|
||||
</div>
|
||||
: null;
|
||||
: <div>
|
||||
<Button className={"single"} size="small" {...buildButtonProps(props.name, props.viewUrl)}>Subscribe</Button>
|
||||
</div>;
|
||||
|
||||
const SubscribeButtonDropdown = (props: Props): JSX.Element => {
|
||||
var buttonProps = buildButtonProps(props.name, props.viewUrl);
|
||||
|
|
|
|||
Loading…
Reference in a new issue