Proyectos de Subversion LeadersLinked - SPA

Rev

Rev 553 | Rev 555 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 553 Rev 554
Línea 47... Línea 47...
47
  updateReactions = () => {},
47
  updateReactions = () => {},
48
}) => {
48
}) => {
49
  const [comments, setComments] = useState(defaultComments)
49
  const [comments, setComments] = useState(defaultComments)
50
  const [totalComments, setTotalComments] = useState(total_comments)
50
  const [totalComments, setTotalComments] = useState(total_comments)
51
  const [totalReactions, setTotalReactions] = useState(total_reactions)
51
  const [totalReactions, setTotalReactions] = useState(total_reactions)
-
 
52
  const [showComments, setShowComments] = useState(false)
52
  const labels = useSelector(({ intl }) => intl.labels)
53
  const labels = useSelector(({ intl }) => intl.labels)
53
  const dispatch = useDispatch()
54
  const dispatch = useDispatch()
Línea 54... Línea 55...
54
 
55
 
55
  const addComment = ({ comment }) => {
56
  const addComment = ({ comment }) => {
Línea 148... Línea 149...
148
                updateReactions(res.total_reactions_question)
149
                updateReactions(res.total_reactions_question)
149
              }}
150
              }}
150
              withLabel
151
              withLabel
151
            />
152
            />
152
          )}
153
          )}
153
          {link_add_comment && <button></button>}
154
          {link_add_comment && (
-
 
155
            <button onClick={() => setShowComments(!showComments)}>
-
 
156
              {labels.comment}
-
 
157
            </button>
-
 
158
          )}
154
          {link_edit && (
159
          {link_edit && (
155
            <button onClick={() => onEdit(link_edit, text)}>
160
            <button onClick={() => onEdit(link_edit, text)}>
156
              <EditIcon />
161
              <EditIcon />
157
              {labels.edit}
162
              {labels.edit}
158
            </button>
163
            </button>
Línea 162... Línea 167...
162
              <DeleteIcon />
167
              <DeleteIcon />
163
              {labels.delete}
168
              {labels.delete}
164
            </button>
169
            </button>
165
          )}
170
          )}
166
        </StyledContainer.Actions>
171
        </StyledContainer.Actions>
167
 
-
 
-
 
172
        <div className="px-1">
168
        <StyledForm image={user_image} onSubmit={addComment} />
173
          <StyledForm image={user_image} onSubmit={addComment} />
-
 
174
          {showComments && (
169
        <CommentsList comments={comments} onDelete={deleteComment} />
175
            <CommentsList comments={comments} onDelete={deleteComment} />
-
 
176
          )}
-
 
177
        </div>
170
      </StyledContainer>
178
      </StyledContainer>
171
    </>
179
    </>
172
  )
180
  )
173
}
181
}