Make the hide setting optional and don't use it on the channel page. (#670)

This commit is contained in:
Dan Peterson 2022-01-11 10:46:13 -06:00 committed by GitHub
parent e58ddbc809
commit dcfb64d907
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View file

@ -150,6 +150,7 @@ function ChannelContent(props: Props) {
liveUris={
isChannelBroadcasting && activeLivestreamForChannel.claimUri ? [activeLivestreamForChannel.claimUri] : []
}
showHideSetting={false}
/>
)}

View file

@ -17,6 +17,7 @@ type Props = {
liveUris: Array<string>,
limitClaimsPerChannel?: number,
onLoad: (number) => void,
showHideSetting: boolean,
// --- perform ---
setClientSetting: (string, boolean | string | number, boolean) => void,
doShowSnackBar: (string) => void,
@ -31,6 +32,7 @@ const ScheduledStreams = (props: Props) => {
setClientSetting,
doShowSnackBar,
onLoad,
showHideSetting = true,
} = props;
const isMediumScreen = useIsMediumScreen();
const isLargeScreen = useIsLargeScreen();
@ -62,7 +64,9 @@ const ScheduledStreams = (props: Props) => {
return (
<div>
{__('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>
);
};