Commit 95e43cab authored by Eric Rosenbaum's avatar Eric Rosenbaum

"Studio Host" label on curator tab tile, behind feature flag

parent 6834d675
...@@ -29,7 +29,7 @@ import removeIcon from './icons/remove-icon.svg'; ...@@ -29,7 +29,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, canRemove, canPromote, onRemove, canTransferHost, onPromote, studioTransferLaunched,
isCreator, hasReachedManagerLimit, // mapState props isCreator, hasReachedManagerLimit, // mapState props
username, image // own props username, image // own props
}) => { }) => {
...@@ -52,7 +52,12 @@ const StudioMemberTile = ({ ...@@ -52,7 +52,12 @@ const StudioMemberTile = ({
href={userUrl} href={userUrl}
className="studio-member-name" className="studio-member-name"
>{username}</a> >{username}</a>
{isCreator && <div className="studio-member-role"><FormattedMessage id="studio.creatorRole" /></div>} {isCreator &&
<div className="studio-member-role">
{studioTransferLaunched ?
<FormattedMessage id="studio.hostRole" /> :
<FormattedMessage id="studio.creatorRole" />}
</div>}
</div> </div>
{(canRemove || canPromote || canTransferHost) && {(canRemove || canPromote || canTransferHost) &&
<OverflowMenu> <OverflowMenu>
...@@ -149,7 +154,8 @@ StudioMemberTile.propTypes = { ...@@ -149,7 +154,8 @@ 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(
...@@ -158,7 +164,8 @@ const ManagerTile = connect( ...@@ -158,7 +164,8 @@ const ManagerTile = connect(
canPromote: false, canPromote: false,
canTransferHost: selectCanTransfer(state, ownProps.id) && canTransferHost: selectCanTransfer(state, ownProps.id) &&
selectStudioTransferLaunched(state), selectStudioTransferLaunched(state),
isCreator: state.studio.owner === ownProps.id isCreator: state.studio.owner === 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