Unverified Commit e229d704 authored by Sarah Otts's avatar Sarah Otts Committed by GitHub

Merge pull request #6084 from seotts/remove-studio-feature-flag

Remove use of studio-related feature flags
parents b747dceb 1ee64bf4
...@@ -147,10 +147,6 @@ module.exports.selectStudioCommentsGloballyEnabled = state => ...@@ -147,10 +147,6 @@ module.exports.selectStudioCommentsGloballyEnabled = state =>
module.exports.selectMuteStatus = state => get(state, ['session', 'session', 'permissions', 'mute_status'], module.exports.selectMuteStatus = state => get(state, ['session', 'session', 'permissions', 'mute_status'],
{muteExpiresAt: 0, offenses: [], showWarning: false}); {muteExpiresAt: 0, offenses: [], showWarning: false});
module.exports.selectIsMuted = state => (module.exports.selectMuteStatus(state).muteExpiresAt || 0) * 1000 > Date.now(); module.exports.selectIsMuted = state => (module.exports.selectMuteStatus(state).muteExpiresAt || 0) * 1000 > Date.now();
module.exports.selectNewStudiosLaunched = state => get(state, ['session', 'session', 'flags', 'new_studios_launched'],
false);
module.exports.selectStudioTransferLaunched = state => get(state, ['session', 'session', 'flags',
'studio_transfer_launched'], false);
module.exports.selectHasFetchedSession = state => state.session.status === module.exports.Status.FETCHED; module.exports.selectHasFetchedSession = state => state.session.status === module.exports.Status.FETCHED;
......
...@@ -12,7 +12,7 @@ const {connect} = require('react-redux'); ...@@ -12,7 +12,7 @@ const {connect} = require('react-redux');
const {useState} = require('react'); const {useState} = require('react');
const projectShape = require('./projectshape.jsx').projectShape; const projectShape = require('./projectshape.jsx').projectShape;
import {selectIsMuted, selectNewStudiosLaunched} from '../../redux/session.js'; import {selectIsMuted} from '../../redux/session.js';
import StudioMuteEditMessage from '../studio/studio-mute-edit-message.jsx'; import StudioMuteEditMessage from '../studio/studio-mute-edit-message.jsx';
require('./subactions.scss'); require('./subactions.scss');
...@@ -159,6 +159,6 @@ Subactions.propTypes = { ...@@ -159,6 +159,6 @@ Subactions.propTypes = {
module.exports = connect( module.exports = connect(
state => ({ state => ({
showAddToStudioMuteError: selectNewStudiosLaunched(state) && selectIsMuted(state) showAddToStudioMuteError: selectIsMuted(state)
}) })
)(Subactions); )(Subactions);
...@@ -13,7 +13,6 @@ import { ...@@ -13,7 +13,6 @@ import {
selectCanRemoveCurator, selectCanRemoveManager, selectCanPromoteCurators, selectCanRemoveCurator, selectCanRemoveManager, selectCanPromoteCurators,
selectCanTransfer selectCanTransfer
} from '../../redux/studio-permissions'; } from '../../redux/studio-permissions';
import {selectStudioTransferLaunched} from '../../redux/session.js';
import { import {
Errors, Errors,
promoteCurator, promoteCurator,
...@@ -29,7 +28,7 @@ import removeIcon from './icons/remove-icon.svg'; ...@@ -29,7 +28,7 @@ import removeIcon from './icons/remove-icon.svg';
import promoteIcon from './icons/curator-icon.svg'; import promoteIcon from './icons/curator-icon.svg';
const StudioMemberTile = ({ const StudioMemberTile = ({
canRemove, canPromote, onRemove, canTransferHost, onPromote, studioTransferLaunched, canRemove, canPromote, onRemove, canTransferHost, onPromote,
isCreator, hasReachedManagerLimit, // mapState props isCreator, hasReachedManagerLimit, // mapState props
username, image // own props username, image // own props
}) => { }) => {
...@@ -54,10 +53,9 @@ const StudioMemberTile = ({ ...@@ -54,10 +53,9 @@ const StudioMemberTile = ({
>{username}</a> >{username}</a>
{isCreator && {isCreator &&
<div className="studio-member-role"> <div className="studio-member-role">
{studioTransferLaunched ? <FormattedMessage id="studio.hostRole" />
<FormattedMessage id="studio.hostRole" /> : </div>
<FormattedMessage id="studio.creatorRole" />} }
</div>}
</div> </div>
{(canRemove || canPromote || canTransferHost) && {(canRemove || canPromote || canTransferHost) &&
<OverflowMenu> <OverflowMenu>
...@@ -154,18 +152,15 @@ StudioMemberTile.propTypes = { ...@@ -154,18 +152,15 @@ StudioMemberTile.propTypes = {
username: PropTypes.string, username: PropTypes.string,
image: PropTypes.string, image: PropTypes.string,
isCreator: PropTypes.bool, isCreator: PropTypes.bool,
hasReachedManagerLimit: PropTypes.bool, hasReachedManagerLimit: PropTypes.bool
studioTransferLaunched: PropTypes.bool
}; };
const ManagerTile = connect( const ManagerTile = connect(
(state, ownProps) => ({ (state, ownProps) => ({
canRemove: selectCanRemoveManager(state, ownProps.id), canRemove: selectCanRemoveManager(state, ownProps.id),
canPromote: false, canPromote: false,
canTransferHost: selectCanTransfer(state, ownProps.id) && canTransferHost: selectCanTransfer(state, ownProps.id),
selectStudioTransferLaunched(state), isCreator: state.studio.owner === ownProps.id
isCreator: state.studio.host === ownProps.id,
studioTransferLaunched: selectStudioTransferLaunched(state)
}), }),
{ {
onRemove: removeManager onRemove: removeManager
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment