hide livestream on upload form if not experimental UI #5735

Merged
DispatchCommit merged 1 commit from fix/hide-livestream-button into master 2021-03-23 18:27:30 +01:00
2 changed files with 5 additions and 1 deletions
Showing only changes of commit 21c28efa1e - Show all commits

View file

@ -18,9 +18,11 @@ import { selectUnclaimedRewardValue } from 'redux/selectors/rewards';
import { selectModal, selectActiveChannelClaim, selectIncognito } from 'redux/selectors/app'; import { selectModal, selectActiveChannelClaim, selectIncognito } from 'redux/selectors/app';
import { makeSelectClientSetting } from 'redux/selectors/settings'; import { makeSelectClientSetting } from 'redux/selectors/settings';
import PublishPage from './view'; import PublishPage from './view';
import { selectUser } from '../../redux/selectors/user';
const select = state => ({ const select = state => ({
...selectPublishFormValues(state), ...selectPublishFormValues(state),
user: selectUser(state),
// The winning claim for a short lbry uri // The winning claim for a short lbry uri
amountNeededForTakeover: selectTakeOverAmount(state), amountNeededForTakeover: selectTakeOverAmount(state),
// My previously published claims under this short lbry uri // My previously published claims under this short lbry uri

View file

@ -87,6 +87,7 @@ type Props = {
enablePublishPreview: boolean, enablePublishPreview: boolean,
activeChannelClaim: ?ChannelClaim, activeChannelClaim: ?ChannelClaim,
incognito: boolean, incognito: boolean,
user: ?{ experimental_ui: boolean },
}; };
function PublishForm(props: Props) { function PublishForm(props: Props) {
@ -132,6 +133,7 @@ function PublishForm(props: Props) {
enablePublishPreview, enablePublishPreview,
activeChannelClaim, activeChannelClaim,
incognito, incognito,
user,
} = props; } = props;
const TAGS_LIMIT = 5; const TAGS_LIMIT = 5;
@ -394,7 +396,7 @@ function PublishForm(props: Props) {
setPrevFileText={setPrevFileText} setPrevFileText={setPrevFileText}
header={ header={
<> <>
{MODES.map((modeName, index) => ( {MODES.map((modeName, index) => !((index === 2) && user && user.experimental_ui) && (
<Button <Button
key={index} key={index}
icon={modeName} icon={modeName}