import { useSelector } from 'react-redux'; import Carousel from 'react-material-ui-carousel' import { Comments } from '../post'; export default function ModalCarousel() { // отслеживаем изменения в карусели const collection = useSelector(state => state?.collection?.FindCollectionOne?.payload) console.log('collection: ', collection) return ( тут будет поста ) }