Proyectos de Subversion LeadersLinked - SPA

Rev

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

Rev 2888 Rev 2889
Línea 1... Línea 1...
1
import React, { useState } from 'react'
1
import React, { useState } from 'react'
2
import { useDispatch, useSelector } from 'react-redux'
2
import { useDispatch, useSelector } from 'react-redux'
3
import { Box, Typography } from '@mui/material'
3
import { Box, Typography } from '@mui/material'
4
import { ChatOutlined, Edit, Delete } from '@mui/icons-material'
4
import { ChatOutlined, Edit } from '@mui/icons-material'
Línea 5... Línea 5...
5
 
5
 
6
import { axios, parse } from '@utils'
6
import { axios, parse } from '@utils'
7
import { withReactions } from '@hocs'
7
import { withReactions } from '@hocs'
Línea 8... Línea 8...
8
import { addNotification } from '@store/notification/notification.actions'
8
import { addNotification } from '@store/notification/notification.actions'
9
 
9
 
10
import { QuestionStats } from './QuestionCard'
10
import { QuestionStats } from './QuestionCard'
11
import Widget from '@components/UI/Widget'
11
import Widget from '@components/UI/Widget'
12
import Button from '@components/UI/buttons/Buttons'
12
import Button from '@components/UI/buttons/Buttons'
-
 
13
import CommentForm from '@components/dashboard/linkedin/comments/comment-form'
Línea 13... Línea 14...
13
import CommentForm from '@components/dashboard/linkedin/comments/comment-form'
14
import CommentsList from '@components/dashboard/linkedin/comments/comment-list'
14
import CommentsList from '@components/dashboard/linkedin/comments/comment-list'
15
import Options from '@components/UI/Option'
15
 
16
 
16
const AnswerCard = ({
17
const AnswerCard = ({
Línea 105... Línea 106...
105
      <Widget>
106
      <Widget>
106
        <Widget.Header
107
        <Widget.Header
107
          avatar={user_image}
108
          avatar={user_image}
108
          title={user_name}
109
          title={user_name}
109
          renderAction={() => (
110
          renderAction={() => (
110
            <QuestionStats>
111
            <Options>
111
              <span>{`${labels.published} ${time_elapsed}`}</span>
112
              {link_delete && (
112
              <span>{`${totalReactions} ${labels.reactions}`}</span>
113
                <Options.Item onClick={() => onDelete(link_delete)}>
-
 
114
                  Borrar
113
              <span>{`${totalComments} ${labels.comments}`}</span>
115
                </Options.Item>
-
 
116
              )}
114
            </QuestionStats>
117
            </Options>
115
          )}
118
          )}
116
        />
119
        />
Línea 117... Línea 120...
117
 
120
 
118
        <Widget.Body>
121
        <Widget.Body>
119
          <Typography>{parse(text)}</Typography>
122
          <Typography>{parse(text)}</Typography>
Línea -... Línea 123...
-
 
123
        </Widget.Body>
-
 
124
 
-
 
125
        <QuestionStats>
-
 
126
          <span>{`${labels.published} ${time_elapsed}`}</span>
-
 
127
          <span>{`${totalReactions} ${labels.reactions}`}</span>
-
 
128
          <span>{`${totalComments} ${labels.comments}`}</span>
120
        </Widget.Body>
129
        </QuestionStats>
121
 
130
 
122
        <Widget.Actions>
131
        <Widget.Actions>
123
          {link_save_reaction && (
132
          {link_save_reaction && (
124
            <ReactionsButton
133
            <ReactionsButton
Línea 144... Línea 153...
144
            <Button onClick={() => onEdit(link_edit, text)}>
153
            <Button onClick={() => onEdit(link_edit, text)}>
145
              <Edit />
154
              <Edit />
146
              {labels.edit}
155
              {labels.edit}
147
            </Button>
156
            </Button>
148
          )}
157
          )}
149
          {link_delete && (
-
 
150
            <Button onClick={() => onDelete(link_delete)}>
-
 
151
              <Delete />
-
 
152
              {labels.delete}
-
 
153
            </Button>
-
 
154
          )}
-
 
155
        </Widget.Actions>
158
        </Widget.Actions>
Línea 156... Línea 159...
156
 
159
 
157
        <Box sx={{ padding: 0.5 }}>
160
        <Box sx={{ padding: 0.5 }}>
158
          <CommentForm onSubmit={addComment} />
161
          <CommentForm onSubmit={addComment} />