Proyectos de Subversion LeadersLinked - SPA

Rev

Rev 2888 | Rev 2917 | 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 from 'react'
1
import React from 'react'
2
import { useSelector } from 'react-redux'
2
import { useSelector } from 'react-redux'
3
import { useNavigate } from 'react-router-dom'
3
import { useNavigate } from 'react-router-dom'
4
import { styled, Typography } from '@mui/material'
4
import { styled, Typography } from '@mui/material'
5
import { ArrowBackIosNew, OpenInNew, Edit, Delete } from '@mui/icons-material'
5
import { ArrowBackIosNew, OpenInNew, Edit } from '@mui/icons-material'
Línea 6... Línea 6...
6
 
6
 
Línea 7... Línea 7...
7
import { parse } from '@utils'
7
import { parse } from '@utils'
8
 
8
 
-
 
9
import Widget from '@components/UI/Widget'
Línea 9... Línea 10...
9
import Widget from '@components/UI/Widget'
10
import Button from '@components/UI/buttons/Buttons'
10
import Button from '@components/UI/buttons/Buttons'
11
import Options from '@components/UI/Option'
11
 
12
 
12
export const QuestionStats = styled('div')`
13
export const QuestionStats = styled('div')`
Línea 69... Línea 70...
69
    <Widget>
70
    <Widget>
70
      <Widget.Header
71
      <Widget.Header
71
        avatar={user_image}
72
        avatar={user_image}
72
        title={user_name}
73
        title={user_name}
73
        renderAction={() => (
74
        renderAction={() => (
74
          <QuestionCategories>
75
          <Options>
75
            {categories.map(({ category }) => (
76
            {link_delete && (
-
 
77
              <Options.Item onClick={() => onDelete(link_delete)}>
-
 
78
                Borrar
76
              <li key={category}>{category}</li>
79
              </Options.Item>
77
            ))}
80
            )}
78
          </QuestionCategories>
81
          </Options>
79
        )}
82
        )}
80
      />
83
      />
Línea 81... Línea 84...
81
 
84
 
82
      <Widget.Body>
85
      <Widget.Body>
-
 
86
        <QuestionCategories>
-
 
87
          {categories.map(({ category }) => (
-
 
88
            <li key={category}>{category}</li>
-
 
89
          ))}
-
 
90
        </QuestionCategories>
-
 
91
 
83
        <h2>{title}</h2>
92
        <Typography variant='h2'>{title}</Typography>
84
        <span>{`${labels.my_coach_question} ${added_on}`}</span>
93
        <Typography variant='body2'>{`${labels.my_coach_question} ${added_on}`}</Typography>
85
        {last_answer_on ? (
94
        {last_answer_on ? (
86
          <span>{`${labels.my_coach_last_answer} ${last_answer_on}`}</span>
95
          <Typography variant='body2'>{`${labels.my_coach_last_answer} ${last_answer_on}`}</Typography>
87
        ) : null}
96
        ) : null}
88
        <Typography>{parse(description)}</Typography>
97
        <Typography>{parse(description)}</Typography>
Línea 89... Línea 98...
89
      </Widget.Body>
98
      </Widget.Body>
90
 
99
 
91
      <QuestionStats>
100
      <QuestionStats>
92
        <span>{`${answers} ${labels.my_coach_answers}`}</span>
101
        <Typography variant='body2'>{`${answers} ${labels.my_coach_answers}`}</Typography>
93
        <span>{`${reactions} ${labels.my_coach_reactions}`}</span>
102
        <Typography variant='body2'>{`${reactions} ${labels.my_coach_reactions}`}</Typography>
94
        <span>{`${views} ${labels.my_coach_views}`}</span>
103
        <Typography variant='body2'>{`${views} ${labels.my_coach_views}`}</Typography>
Línea 95... Línea 104...
95
        <span>{`${comments} ${labels.comments}`}</span>
104
        <Typography variant='body2'>{`${comments} ${labels.comments}`}</Typography>
96
      </QuestionStats>
105
      </QuestionStats>
97
 
106
 
Línea 118... Línea 127...
118
          <Button onClick={() => onReply(link_edit)}>
127
          <Button onClick={() => onReply(link_edit)}>
119
            <Edit />
128
            <Edit />
120
            {labels.reply}
129
            {labels.reply}
121
          </Button>
130
          </Button>
122
        )}
131
        )}
123
        {link_delete && (
-
 
124
          <Button
-
 
125
            className='btn feed__share-option'
-
 
126
            onClick={() => onDelete(link_delete)}
-
 
127
          >
-
 
128
            <Delete />
-
 
129
            {labels.delete}
-
 
130
          </Button>
-
 
131
        )}
-
 
132
      </Widget.Actions>
132
      </Widget.Actions>
133
    </Widget>
133
    </Widget>
134
  )
134
  )
135
}
135
}