import user from '../materials/user.png' import { actionFullProfilePageUser } from '../redux/thunk' import { Avatar, Button } from 'antd' import { CSearch } from './Search_Users' import { Link } from 'react-router-dom' import { connect } from 'react-redux' import React, { useEffect,useState } from 'react' export const AddPost = ({ children }) => { const [state, setState] = useState(false) return ( <> setState(!state)}> {' '} +{' '} {!state && children} ) } export const Feed = () => { return ( <> Feed ) } export const Explore = () => ( {' '} Explore{' '} ) const User = ({ my_Id, aboutMe: { _id, login, avatar } = {}, onMyPage }) => { useEffect(() => onMyPage(_id), [_id]) return ( {avatar?.url ? ( ) : ( )} ) } export const CUser = connect( (state) => ({ my_Id: state.auth?.payload?.sub?.id, aboutMe: state.profileData.aboutMe, }), { onMyPage: actionFullProfilePageUser }, )(User)