Proyectos de Subversion LeadersLinked - SPA

Rev

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

Rev 536 Rev 748
Línea 14... Línea 14...
14
export const QuestionStats = styled.div`
14
export const QuestionStats = styled.div`
15
  display: flex;
15
  display: flex;
16
  align-items: center;
16
  align-items: center;
17
  gap: 0.5rem;
17
  gap: 0.5rem;
18
  justify-content: space-around;
18
  justify-content: space-around;
-
 
19
  padding: 5px;
19
`
20
`
Línea -... Línea 21...
-
 
21
 
-
 
22
const StyledQuestionContainer = styled(StyledContainer)`
-
 
23
  display: flex;
-
 
24
  flex-direction: column;
-
 
25
  height: 100%;
-
 
26
`
-
 
27
 
-
 
28
const StyledBody = styled(StyledContainer.Body)`
-
 
29
  flex: 1 1 0;
-
 
30
`
20
 
31
 
21
export const QuestionCategories = styled.ul`
32
const QuestionCategories = styled.ul`
22
  align-items: center;
33
  align-items: center;
23
  display: flex;
34
  display: flex;
24
  gap: 0.5rem;
35
  gap: 0.5rem;
25
  flex-wrap: wrap;
36
  flex-wrap: wrap;
Línea 51... Línea 62...
51
  link_delete = '',
62
  link_delete = '',
52
  link_answers_add = '',
63
  link_answers_add = '',
53
  link_answers = '',
64
  link_answers = '',
54
  onDelete = () => null,
65
  onDelete = () => null,
55
  onEdit = () => null,
66
  onEdit = () => null,
56
  onReply = () => null,
67
  onReply = () => null
57
}) => {
68
}) => {
58
  const labels = useSelector(({ intl }) => intl.labels)
69
  const labels = useSelector(({ intl }) => intl.labels)
59
  const history = useHistory()
70
  const history = useHistory()
Línea 60... Línea 71...
60
 
71
 
Línea 65... Línea 76...
65
  const goBack = () => {
76
  const goBack = () => {
66
    history.replace('/my-coach')
77
    history.replace('/my-coach')
67
  }
78
  }
Línea 68... Línea 79...
68
 
79
 
69
  return (
80
  return (
70
    <StyledContainer>
81
    <StyledQuestionContainer>
71
      <StyledContainer.Header image={user_image} title={user_name}>
82
      <StyledContainer.Header image={user_image} title={user_name}>
72
        <QuestionCategories>
83
        <QuestionCategories>
73
          {categories.map(({ category }) => (
84
          {categories.map(({ category }) => (
74
            <li key={category}>{category}</li>
85
            <li key={category}>{category}</li>
75
          ))}
86
          ))}
76
        </QuestionCategories>
87
        </QuestionCategories>
-
 
88
      </StyledContainer.Header>
77
      </StyledContainer.Header>
89
 
78
      <StyledContainer.Body>
90
      <StyledBody>
79
        <h2>{title}</h2>
91
        <h2>{title}</h2>
80
        <span>{`${labels.my_coach_question} ${added_on}`}</span>
92
        <span>{`${labels.my_coach_question} ${added_on}`}</span>
81
        {last_answer_on ? (
93
        {last_answer_on ? (
82
          <span>{`${labels.my_coach_last_answer} ${last_answer_on}`}</span>
94
          <span>{`${labels.my_coach_last_answer} ${last_answer_on}`}</span>
83
        ) : null}
95
        ) : null}
-
 
96
        <Paraphrase>{description}</Paraphrase>
-
 
97
      </StyledBody>
-
 
98
 
-
 
99
      <QuestionStats>
-
 
100
        <span>{`${answers} ${labels.my_coach_answers}`}</span>
-
 
101
        <span>{`${reactions} ${labels.my_coach_reactions}`}</span>
-
 
102
        <span>{`${views} ${labels.my_coach_views}`}</span>
-
 
103
        <span>{`${comments} ${labels.comments}`}</span>
Línea 84... Línea -...
84
        <Paraphrase>{description}</Paraphrase>
-
 
85
 
-
 
86
        <QuestionStats>
-
 
87
          <span>{`${answers} ${labels.my_coach_answers}`}</span>
-
 
88
          <span>{`${reactions} ${labels.my_coach_reactions}`}</span>
-
 
89
          <span>{`${views} ${labels.my_coach_views}`}</span>
-
 
90
          <span>{`${comments} ${labels.comments}`}</span>
-
 
91
        </QuestionStats>
104
      </QuestionStats>
92
      </StyledContainer.Body>
105
 
93
      <StyledContainer.Actions>
106
      <StyledContainer.Actions>
94
        {link_answers && (
107
        {link_answers && (
95
          <button onClick={goBack}>
108
          <button onClick={goBack}>
Línea 115... Línea 128...
115
            {labels.reply}
128
            {labels.reply}
116
          </button>
129
          </button>
117
        )}
130
        )}
118
        {link_delete && (
131
        {link_delete && (
119
          <button
132
          <button
120
            className="btn feed__share-option"
133
            className='btn feed__share-option'
121
            onClick={() => onDelete(link_delete)}
134
            onClick={() => onDelete(link_delete)}
122
          >
135
          >
123
            <DeleteIcon />
136
            <DeleteIcon />
124
            {labels.delete}
137
            {labels.delete}
125
          </button>
138
          </button>
126
        )}
139
        )}
127
      </StyledContainer.Actions>
140
      </StyledContainer.Actions>
128
    </StyledContainer>
141
    </StyledQuestionContainer>
129
  )
142
  )
130
}
143
}
Línea 131... Línea 144...
131
 
144