mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-28 01:56:00 -05:00
do not show option to transfer ownership to yourself
This commit is contained in:
parent
f8195d1024
commit
6fb1e7ccd2
1 changed files with 7 additions and 3 deletions
|
@ -5,6 +5,7 @@ import {FormattedMessage} from 'react-intl';
|
|||
|
||||
import ModalInnerContent from '../../../components/modal/base/modal-inner-content.jsx';
|
||||
|
||||
import {selectUserId} from '../../../redux/session';
|
||||
import {managers} from '../lib/redux-modules';
|
||||
import {loadManagers} from '../lib/studio-member-actions';
|
||||
|
||||
|
@ -12,7 +13,8 @@ import './transfer-ownership-modal.scss';
|
|||
|
||||
const TransferOwnershipSelection = ({
|
||||
handleClose,
|
||||
items
|
||||
items,
|
||||
userId
|
||||
}) => {
|
||||
useEffect(() => {
|
||||
if (items.length === 0) onLoadMore();
|
||||
|
@ -27,7 +29,7 @@ const TransferOwnershipSelection = ({
|
|||
</h3>
|
||||
<div className="studio-members-grid">
|
||||
{items.map(item =>
|
||||
<span>{item.username}</span>
|
||||
userId !== item.id && <span>{item.username}</span>
|
||||
)}
|
||||
{/* {moreToLoad &&
|
||||
<div className="studio-grid-load-more">
|
||||
|
@ -74,11 +76,13 @@ TransferOwnershipSelection.propTypes = {
|
|||
})
|
||||
})),
|
||||
moreToLoad: PropTypes.bool,
|
||||
onLoadMore: PropTypes.func
|
||||
onLoadMore: PropTypes.func,
|
||||
userId: PropTypes.number
|
||||
};
|
||||
|
||||
export default connect(
|
||||
state => ({
|
||||
userId: selectUserId(state),
|
||||
...managers.selector(state)
|
||||
}),
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue