Commit 1afbe4ad authored by picklesrus's avatar picklesrus

clean up

parent 993dd36a
......@@ -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
......
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