import {backendURL,actionAllPosts,actionOnePost,actionAboutMe} from '../actions' import user from '../materials/user.png' import React, { useMemo, useState, useEffect } from 'react' import {Card} from '../components/Post' import { Provider, connect } from 'react-redux' import { Avatar, Image, Divider, Radio } from 'antd' import { store } from '../reducers' const PageAboutUser = ({ aboutMe: { _id, login, nick, createdAt, avatar, followers, following } = {}, allPosts, onPosts, onPost, onAboutUser }) => { useEffect(() => { onAboutUser(_id) onPosts() }, []) // console.log('CREATED AT',new Intl.DateTimeFormat().format(createdAt)); return (

{login}

{' '} Created Account: {new Intl.DateTimeFormat('en-GB').format(createdAt)}

{/* {allPosts?.length} style={{display: 'flex',justifyContent: 'space-between'}}*/}

{allPosts?.length} posts

{' '} {followers?.length} followers{' '}

{' '} {following?.length} following{' '}

nick: {nick == null ? login : nick}

{(allPosts || [])?.map((item) => ( ))}
{/*

Created Account: {
date}

*/}
) } export const CPageAboutUser = connect( (state) => ({ aboutMe: state.promise?.aboutMe?.payload, allPosts: state.promise?.allPosts?.payload, }), { onPosts: actionAllPosts, onPost: actionOnePost, onAboutUser: actionAboutMe }, )(PageAboutUser)