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 =>
module.exports.selectMuteStatus = state => get(state, ['session', 'session', 'permissions', 'mute_status'],
{muteExpiresAt: 0, offenses: [], showWarning: false});
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;
......
......@@ -12,7 +12,7 @@ const {connect} = require('react-redux');
const {useState} = require('react');
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';
require('./subactions.scss');
......@@ -159,6 +159,6 @@ Subactions.propTypes = {
module.exports = connect(
state => ({
showAddToStudioMuteError: selectNewStudiosLaunched(state) && selectIsMuted(state)
showAddToStudioMuteError: selectIsMuted(state)
})
)(Subactions);
......@@ -13,7 +13,6 @@ import {
selectCanRemoveCurator, selectCanRemoveManager, selectCanPromoteCurators,
selectCanTransfer
} from '../../redux/studio-permissions';
import {selectStudioTransferLaunched} from '../../redux/session.js';
import {
Errors,
promoteCurator,
......@@ -29,7 +28,7 @@ import removeIcon from './icons/remove-icon.svg';
import promoteIcon from './icons/curator-icon.svg';
const StudioMemberTile = ({
canRemove, canPromote, onRemove, canTransferHost, onPromote, studioTransferLaunched,
canRemove, canPromote, onRemove, canTransferHost, onPromote,
isCreator, hasReachedManagerLimit, // mapState props
username, image // own props
}) => {
......@@ -54,10 +53,9 @@ const StudioMemberTile = ({
>{username}</a>
{isCreator &&
<div className="studio-member-role">
{studioTransferLaunched ?
<FormattedMessage id="studio.hostRole" /> :
<FormattedMessage id="studio.creatorRole" />}
</div>}
<FormattedMessage id="studio.hostRole" />
</div>
}
</div>
{(canRemove || canPromote || canTransferHost) &&
<OverflowMenu>
......@@ -154,18 +152,15 @@ StudioMemberTile.propTypes = {
username: PropTypes.string,
image: PropTypes.string,
isCreator: PropTypes.bool,
hasReachedManagerLimit: PropTypes.bool,
studioTransferLaunched: PropTypes.bool
hasReachedManagerLimit: PropTypes.bool
};
const ManagerTile = connect(
(state, ownProps) => ({
canRemove: selectCanRemoveManager(state, ownProps.id),
canPromote: false,
canTransferHost: selectCanTransfer(state, ownProps.id) &&
selectStudioTransferLaunched(state),
isCreator: state.studio.host === ownProps.id,
studioTransferLaunched: selectStudioTransferLaunched(state)
canTransferHost: selectCanTransfer(state, ownProps.id),
isCreator: state.studio.owner === ownProps.id
}),
{
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