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={ liveUris={
isChannelBroadcasting && activeLivestreamForChannel.claimUri ? [activeLivestreamForChannel.claimUri] : [] isChannelBroadcasting && activeLivestreamForChannel.claimUri ? [activeLivestreamForChannel.claimUri] : []
} }
showHideSetting={false}
/> />
)} )}

View file

@ -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>
); );
}; };