Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

Rev 5902 | Rev 5905 | Ir a la última revisión | | Comparar con el anterior | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
4265 stevensc 1
/* eslint-disable react/prop-types */
5901 stevensc 2
import React, { useEffect } from 'react'
4265 stevensc 3
import { useDispatch } from 'react-redux'
4
import { setTimelineUrl } from '../../../../redux/feed/feed.actions'
5
import { feedTypes } from '../../../../redux/feed/feed.types'
6
import FeedShare from './FeedShare'
7
import FeedList from './FeedList'
8
import './Feed.scss'
9
 
10
const FeedSection = ({ routeTimeline, backendVars }) => {
5903 stevensc 11
  const { image = '', feed = {} } = backendVars
4265 stevensc 12
  const dispatch = useDispatch()
13
 
5901 stevensc 14
  useEffect(() => {
15
    dispatch(setTimelineUrl(routeTimeline))
16
  }, [])
4495 stevensc 17
 
4265 stevensc 18
  return (
5901 stevensc 19
    <div className="feed__section">
4265 stevensc 20
      <FeedShare
21
        image={image}
22
        feedType={feedTypes.DASHBOARD}
23
        postUrl="/feed/add"
24
      />
5901 stevensc 25
      <FeedList routeTimeline={routeTimeline} feed={feed} image={image} />
4265 stevensc 26
    </div>
27
  )
28
}
29
 
30
export default FeedSection