From d362fe0d75d165901eb6a9def5978d11d3c9d5d5 Mon Sep 17 00:00:00 2001 From: Dispatch <45262335+DispatchCommit@users.noreply.github.com> Date: Tue, 23 Mar 2021 10:27:30 -0700 Subject: [PATCH] hide livestream on upload form if not experimental UI (#5735) --- ui/component/publishForm/index.js | 2 ++ ui/component/publishForm/view.jsx | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ui/component/publishForm/index.js b/ui/component/publishForm/index.js index 4f6315a66..462b42a36 100644 --- a/ui/component/publishForm/index.js +++ b/ui/component/publishForm/index.js @@ -18,9 +18,11 @@ import { selectUnclaimedRewardValue } from 'redux/selectors/rewards'; import { selectModal, selectActiveChannelClaim, selectIncognito } from 'redux/selectors/app'; import { makeSelectClientSetting } from 'redux/selectors/settings'; import PublishPage from './view'; +import { selectUser } from '../../redux/selectors/user'; const select = state => ({ ...selectPublishFormValues(state), + user: selectUser(state), // The winning claim for a short lbry uri amountNeededForTakeover: selectTakeOverAmount(state), // My previously published claims under this short lbry uri diff --git a/ui/component/publishForm/view.jsx b/ui/component/publishForm/view.jsx index 8113e0105..8e49e3d01 100644 --- a/ui/component/publishForm/view.jsx +++ b/ui/component/publishForm/view.jsx @@ -87,6 +87,7 @@ type Props = { enablePublishPreview: boolean, activeChannelClaim: ?ChannelClaim, incognito: boolean, + user: ?{ experimental_ui: boolean }, }; function PublishForm(props: Props) { @@ -132,6 +133,7 @@ function PublishForm(props: Props) { enablePublishPreview, activeChannelClaim, incognito, + user, } = props; const TAGS_LIMIT = 5; @@ -394,7 +396,7 @@ function PublishForm(props: Props) { setPrevFileText={setPrevFileText} header={ <> - {MODES.map((modeName, index) => ( + {MODES.map((modeName, index) => !((index === 2) && user && user.experimental_ui) && (