Proyectos de Subversion LeadersLinked - SPA

Rev

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

Rev 3002 Rev 3694
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 { OpenInNew, Edit } from '@mui/icons-material'
5
import OpenInNew from '@mui/icons-material/OpenInNew';
-
 
6
import Edit from '@mui/icons-material/Edit';
6
 
7
 
7
import { parse } from '@utils'
8
import { parse } from '@utils';
8
 
9
 
9
import Widget from '@components/UI/Widget'
10
import Widget from '@components/UI/Widget';
10
import Button from '@components/UI/buttons/Buttons'
11
import Button from '@components/UI/buttons/Buttons';
11
import Options from '@components/UI/Option'
12
import Options from '@components/UI/Option';
Línea 12... Línea 13...
12
 
13
 
13
export const QuestionStats = styled('div')`
14
export const QuestionStats = styled('div')`
14
  display: flex;
15
  display: flex;
15
  align-items: center;
16
  align-items: center;
16
  gap: 0.5rem;
17
  gap: 0.5rem;
17
  justify-content: space-around;
18
  justify-content: space-around;
18
  padding: 5px;
19
  padding: 5px;
Línea 19... Línea 20...
19
`
20
`;
20
 
21
 
21
const QuestionCategories = styled('ul')`
22
const QuestionCategories = styled('ul')`
22
  align-items: center;
23
  align-items: center;
Línea 30... Línea 31...
30
    color: var(--font-color);
31
    color: var(--font-color);
31
    padding: 0.3rem 0.4rem;
32
    padding: 0.3rem 0.4rem;
32
    font-size: 0.7rem;
33
    font-size: 0.7rem;
33
    font-weight: 600;
34
    font-weight: 600;
34
  }
35
  }
35
`
36
`;
Línea 36... Línea 37...
36
 
37
 
37
const QuestionCard = ({
38
const QuestionCard = ({
38
  last_answer_on = '',
39
  last_answer_on = '',
39
  added_on = '',
40
  added_on = '',
Línea 52... Línea 53...
52
  link_answers_add = '',
53
  link_answers_add = '',
53
  onDelete = () => null,
54
  onDelete = () => null,
54
  onEdit = () => null,
55
  onEdit = () => null,
55
  onReply = () => null
56
  onReply = () => null
56
}) => {
57
}) => {
57
  const labels = useSelector(({ intl }) => intl.labels)
58
  const labels = useSelector(({ intl }) => intl.labels);
58
  const navigate = useNavigate()
59
  const navigate = useNavigate();
Línea 59... Línea 60...
59
 
60
 
60
  const onView = (url = '') => {
61
  const onView = (url = '') => {
61
    navigate(url)
62
    navigate(url);
Línea 62... Línea 63...
62
  }
63
  };
63
 
64
 
64
  return (
65
  return (
65
    <Widget>
66
    <Widget>
66
      <Widget.Header
67
      <Widget.Header
67
        avatar={user_image}
68
        avatar={user_image}
68
        title={user_name}
69
        title={user_name}
69
        renderAction={() => (
70
        renderAction={() => (
70
          <Options>
71
          <Options>
71
            {link_delete && (
-
 
72
              <Options.Item onClick={() => onDelete(link_delete)}>
-
 
73
                Borrar
72
            {link_delete && (
74
              </Options.Item>
73
              <Options.Item onClick={() => onDelete(link_delete)}>Borrar</Options.Item>
75
            )}
74
            )}
76
          </Options>
75
          </Options>
Línea 118... Línea 117...
118
            {labels.reply}
117
            {labels.reply}
119
          </Button>
118
          </Button>
120
        )}
119
        )}
121
      </Widget.Actions>
120
      </Widget.Actions>
122
    </Widget>
121
    </Widget>
123
  )
122
  );
124
}
123
};
Línea 125... Línea 124...
125
 
124