import user from '../../materials/user.png'
import { actionFullProfilePageUserTypeSaga } from '../../actions/typeSaga/userTypesSaga'
import { Avatar } from 'antd'
import { Link } from 'react-router-dom'
import { connect } from 'react-redux'
import backendURL from '../../helpers/backendUrl'
import {
HomeOutlined,
CompassOutlined,
PlusSquareOutlined,
ImportOutlined,
SearchOutlined
} from '@ant-design/icons'
import React, { useEffect, useState } from 'react'
const DefaultLink = ({ link, tag }) => {
return (
{tag}
)
}
export const Feed = () =>
} />
export const Explore = () => (
} />
)
export const SearchMobile = () => (
} />
)
export const AddPost = ({ children }) => {
const [state, setState] = useState(false)
return (
<>
setState(!state)} />
{!state && children}
>
)
}
export const LogOut = ({ onClick }) => (
)
const User = ({ my_Id, aboutMe: { _id, avatar } = {}, onMyPage }) => {
useEffect(() => {
if (my_Id) onMyPage(my_Id)
}, [my_Id])
return (
{avatar?.url ? (
) : (
)}
)
}
export const CUser = connect(
(state) => ({
my_Id: state.auth?.payload?.sub?.id,
aboutMe: state.myData.aboutMe,
}),
{ onMyPage: actionFullProfilePageUserTypeSaga },
)(User)