mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2025-02-17 00:21:20 -05:00
clean up
This commit is contained in:
parent
993dd36aa5
commit
1afbe4ad79
2 changed files with 8 additions and 5 deletions
|
@ -602,8 +602,9 @@ const PreviewPresentation = ({
|
|||
author={comment.author}
|
||||
canDelete={canDeleteComments}
|
||||
canDeleteWithoutConfirm={isAdmin}
|
||||
canReply=
|
||||
{isLoggedIn && projectInfo.comments_allowed && isShared}
|
||||
canReply={
|
||||
isLoggedIn && projectInfo.comments_allowed && isShared
|
||||
}
|
||||
canReport={isLoggedIn}
|
||||
canRestore={canRestoreComments}
|
||||
content={comment.content}
|
||||
|
@ -615,7 +616,9 @@ const PreviewPresentation = ({
|
|||
moreRepliesToLoad={comment.moreRepliesToLoad}
|
||||
parentId={comment.parent_id}
|
||||
postURI={`/proxy/comments/project/${projectId}`}
|
||||
replies={replies && replies[comment.id] ? replies[comment.id] : []}
|
||||
replies={
|
||||
replies && replies[comment.id] ? replies[comment.id] : []
|
||||
}
|
||||
visibility={comment.visibility}
|
||||
onAddComment={onAddComment}
|
||||
onDelete={onDeleteComment}
|
||||
|
|
|
@ -903,6 +903,7 @@ Preview.propTypes = {
|
|||
isAdmin: PropTypes.bool,
|
||||
isEditable: PropTypes.bool,
|
||||
isLoggedIn: PropTypes.bool,
|
||||
isProjectCommentsGloballyEnabled: PropTypes.bool,
|
||||
isNewScratcher: PropTypes.bool,
|
||||
isScratcher: PropTypes.bool,
|
||||
isShared: PropTypes.bool,
|
||||
|
@ -983,8 +984,7 @@ const mapStateToProps = state => {
|
|||
const isEditable = isLoggedIn &&
|
||||
(authorUsername === state.session.session.user.username ||
|
||||
state.permissions.admin === true);
|
||||
const haveSession = state.session.session.flags;
|
||||
const areCommentsOn = haveSession && selectProjectCommentsGloballyEnabled(state);
|
||||
const areCommentsOn = state.session.session.flags && selectProjectCommentsGloballyEnabled(state);
|
||||
|
||||
|
||||
// if we don't have projectInfo, assume it's shared until we know otherwise
|
||||
|
|
Loading…
Reference in a new issue