import React from 'react' ; import { useSelector , useStore } from 'react-redux' ; import { loadLiveList } from '@app/redux/actions/live' ; import { getLiveListById } from '@app/redux/reducers/live' ; import Item from './components/images' ; import ListClass from '@app/class/list' ; interface Props { id : string ; query : object ; scrollLoad ? : boolean ; showPagination ? : boolean ; nothing ? : string ; } export default function ( props ) { const { id } = props ; const store = useStore ( ) ; const list = useSelector ( ( state ) => { return getLiveListById ( state , id ) ; } ) ; return ( < div className = "row" > < ListClass { ... props } { ... list } load = { ( params ) => loadLiveList ( params ) ( store . dispatch , store . getState ) } renderItem = { ( item ) => { return ( < Item key = { item . _id } data = { item } / > ) ; } } /></div > ) ; }