import React from "react"; import { Box } from "./Box"; import { FeedItemHeader} from "./FeedItemHeader"; import { FeedItemButtons} from "./FeedItemButtons"; import { FeedItemComment} from "./FeedItemComment"; import { AddComment} from "./AddComment"; import { FeedItemPhotos} from "./FeedItemPhotos"; import { useHistory } from "react-router-dom"; import { ModalStateHook } from "./ModalHook"; import { useTranslation } from 'react-i18next'; export function FeedItem({ data }) { const {hideModal, setModal } = ModalStateHook(); const history = useHistory(); const { t } = useTranslation(); const moreClickEvent = () => { setModal(true, data); }; return ( {data?.likeCount || "0"} {t('social:likes')} history.push(`/post/${data?.pid || "post-test"}`) } > {t('social:viewComments', { count: data?.commentCount || 0 })} {data.popularComments.map((item: any) => { return ( ); })} history.push(`/post/${data?.pid || "post-test"}`) } > {data.time} ); }