Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev 5608 Rev 5617
Línea 17... Línea 17...
17
import AccessTimeIcon from '@mui/icons-material/AccessTime'
17
import AccessTimeIcon from '@mui/icons-material/AccessTime'
Línea 18... Línea 18...
18
 
18
 
19
// Styles
19
// Styles
20
import '../templates/linkedin/Feed/Feed.scss'
20
import '../templates/linkedin/Feed/Feed.scss'
-
 
21
import FeedCommentSection from '../components/feed/feed-comment/FeedCommentSection'
-
 
22
import { useDispatch } from 'react-redux'
Línea 21... Línea 23...
21
import FeedCommentSection from '../components/feed/feed-comment/FeedCommentSection'
23
import { setIntlLabels } from '../../redux/intl/intl.action'
22
 
-
 
23
export default function PostView({
-
 
24
  post = {
-
 
25
    url: '',
-
 
26
    file: '',
-
 
27
    comments_url: '',
-
 
28
    comments_add_url: '',
-
 
29
  },
24
 
30
}) {
25
export default function PostView({ post, labels }) {
31
  const [isLiked, setIsLiked] = useState(post.is_liked)
26
  const [isLiked, setIsLiked] = useState(post.is_liked)
32
  const [externalShare, setExternalShare] = useState(post.total_share_external)
27
  const [externalShare, setExternalShare] = useState(post.total_share_external)
33
  const [comments, setComments] = useState([])
28
  const [comments, setComments] = useState([])
-
 
29
  const [isReadMoreActive, setIsReadMoreActive] = useState(false)
Línea 34... Línea 30...
34
  const [isReadMoreActive, setIsReadMoreActive] = useState(false)
30
  const [showComments, setShowComments] = useState(false)
Línea 35... Línea 31...
35
  const [showComments, setShowComments] = useState(false)
31
  const dispatch = useDispatch()
36
 
32
 
Línea 91... Línea 87...
91
    }
87
    }
92
    return <p>{fullText}</p>
88
    return <p>{fullText}</p>
93
  }
89
  }
Línea 94... Línea 90...
94
 
90
 
-
 
91
  useEffect(() => {
-
 
92
    dispatch(setIntlLabels(labels))
-
 
93
  }, [])
-
 
94
 
95
  useEffect(() => {
95
  useEffect(() => {
96
    if (showComments && !comments.length) getComments()
96
    if (showComments && !comments.length) getComments()
Línea 97... Línea 97...
97
  }, [showComments])
97
  }, [showComments])
98
 
98