handle null check within component

This commit is contained in:
Collin M. Barrett 2019-09-01 16:01:13 -05:00
parent 49decf6b98
commit 1727c168c6

View file

@ -9,10 +9,12 @@ interface Props {
};
export const SubscribeButtons = (props: Props) =>
<>
<SubscribeButton name={props.name} viewUrl={props.viewUrl} text="Subscribe" />
<MirrorButtons name={props.name} viewUrlMirrors={props.viewUrlMirrors} />
</>;
props.viewUrl
? <>
<SubscribeButton name={props.name} viewUrl={props.viewUrl} text="Subscribe" />
<MirrorButtons name={props.name} viewUrlMirrors={props.viewUrlMirrors} />
</>
: null;
interface MirrorButtonsProps {
name: string;