Proyectos de Subversion LeadersLinked - SPA

Rev

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

Rev 2917 Rev 3002
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 } from '@mui/icons-material'
5
import { 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
 
Línea 48... Línea 48...
48
  comments = 0,
48
  comments = 0,
49
  link_view = '',
49
  link_view = '',
50
  link_edit = '',
50
  link_edit = '',
51
  link_delete = '',
51
  link_delete = '',
52
  link_answers_add = '',
52
  link_answers_add = '',
53
  link_answers = '',
-
 
54
  onDelete = () => null,
53
  onDelete = () => null,
55
  onEdit = () => null,
54
  onEdit = () => null,
56
  onReply = () => null
55
  onReply = () => null
57
}) => {
56
}) => {
58
  const labels = useSelector(({ intl }) => intl.labels)
57
  const labels = useSelector(({ intl }) => intl.labels)
Línea 60... Línea 59...
60
 
59
 
61
  const onView = (url = '') => {
60
  const onView = (url = '') => {
62
    navigate(url)
61
    navigate(url)
Línea 63... Línea -...
63
  }
-
 
64
 
-
 
65
  const goBack = () => {
-
 
66
    navigate('/my-coach')
-
 
67
  }
62
  }
68
 
63
 
69
  return (
64
  return (
70
    <Widget>
65
    <Widget>
71
      <Widget.Header
66
      <Widget.Header
Línea 103... Línea 98...
103
        <Typography variant='overline'>{`${views} ${labels.my_coach_views}`}</Typography>
98
        <Typography variant='overline'>{`${views} ${labels.my_coach_views}`}</Typography>
104
        <Typography variant='overline'>{`${comments} ${labels.comments}`}</Typography>
99
        <Typography variant='overline'>{`${comments} ${labels.comments}`}</Typography>
105
      </QuestionStats>
100
      </QuestionStats>
Línea 106... Línea 101...
106
 
101
 
107
      <Widget.Actions>
-
 
108
        {link_answers && (
-
 
109
          <Button onClick={goBack}>
-
 
110
            <ArrowBackIosNew />
-
 
111
            {labels.back}
-
 
112
          </Button>
-
 
113
        )}
102
      <Widget.Actions>
114
        {link_view && (
103
        {link_view && (
115
          <Button onClick={() => onView(link_view)}>
104
          <Button onClick={() => onView(link_view)}>
116
            <OpenInNew />
105
            <OpenInNew />
117
            {labels.view}
106
            {labels.view}