Make the hide setting optional and don't use it on the channel page. (#670)
This commit is contained in:
parent
e58ddbc809
commit
dcfb64d907
2 changed files with 6 additions and 1 deletions
|
@ -150,6 +150,7 @@ function ChannelContent(props: Props) {
|
||||||
liveUris={
|
liveUris={
|
||||||
isChannelBroadcasting && activeLivestreamForChannel.claimUri ? [activeLivestreamForChannel.claimUri] : []
|
isChannelBroadcasting && activeLivestreamForChannel.claimUri ? [activeLivestreamForChannel.claimUri] : []
|
||||||
}
|
}
|
||||||
|
showHideSetting={false}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|
|
@ -17,6 +17,7 @@ type Props = {
|
||||||
liveUris: Array<string>,
|
liveUris: Array<string>,
|
||||||
limitClaimsPerChannel?: number,
|
limitClaimsPerChannel?: number,
|
||||||
onLoad: (number) => void,
|
onLoad: (number) => void,
|
||||||
|
showHideSetting: boolean,
|
||||||
// --- perform ---
|
// --- perform ---
|
||||||
setClientSetting: (string, boolean | string | number, boolean) => void,
|
setClientSetting: (string, boolean | string | number, boolean) => void,
|
||||||
doShowSnackBar: (string) => void,
|
doShowSnackBar: (string) => void,
|
||||||
|
@ -31,6 +32,7 @@ const ScheduledStreams = (props: Props) => {
|
||||||
setClientSetting,
|
setClientSetting,
|
||||||
doShowSnackBar,
|
doShowSnackBar,
|
||||||
onLoad,
|
onLoad,
|
||||||
|
showHideSetting = true,
|
||||||
} = props;
|
} = props;
|
||||||
const isMediumScreen = useIsMediumScreen();
|
const isMediumScreen = useIsMediumScreen();
|
||||||
const isLargeScreen = useIsLargeScreen();
|
const isLargeScreen = useIsLargeScreen();
|
||||||
|
@ -62,7 +64,9 @@ const ScheduledStreams = (props: Props) => {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
{__('Upcoming Livestreams')}
|
{__('Upcoming Livestreams')}
|
||||||
<Button button="link" label={__('Hide')} onClick={hideScheduledStreams} className={'ml-s text-s'} />
|
{showHideSetting && (
|
||||||
|
<Button button="link" label={__('Hide')} onClick={hideScheduledStreams} className={'ml-s text-s'} />
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue