|
@@ -1,16 +1,26 @@
|
|
|
import { connect } from "react-redux"
|
|
|
import { backendURL } from "../../actions"
|
|
|
+import CUserPosts from "./UserPosts";
|
|
|
|
|
|
|
|
|
const UserItem = ({aboutUser = {}}) =>{
|
|
|
console.log(aboutUser);
|
|
|
return(
|
|
|
- <div className="flex">
|
|
|
- <div>
|
|
|
- <img src={`${backendURL}/${aboutUser.avatar.url}`} alt="avatar" className="h-60 w-60 rounded-full"/>
|
|
|
+ <div>
|
|
|
+ <div className="flex flex-wrap items-center p-4 md:py-8">
|
|
|
+ <div className="md:w-3/12">
|
|
|
+ <img src={aboutUser?.avatar?.url ?`${backendURL}/${aboutUser.avatar.url} `: "nothing"} alt="avatar" className="h-20 w-20 md:w-40 md:h-40 lg:w-60 lg:h-60 object-cover rounded-full"/>
|
|
|
+ </div>
|
|
|
+ <div className="md:flex md:flex-wrap md:items-center">
|
|
|
+ <h2 className="text-3x1 inline-block font-light mr-0.5 sm:mb-0">{aboutUser.nick}</h2>
|
|
|
+ <button className="bg-fuchsia-600 px-2 py-1 text-white font-semibold text-sm rounded block text-center sm:inline-block">Follow</button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div className="px-px md:px-3">
|
|
|
+
|
|
|
+ <CUserPosts/>
|
|
|
+
|
|
|
</div>
|
|
|
-
|
|
|
- <h2>{aboutUser.nick}</h2>
|
|
|
</div>
|
|
|
)
|
|
|
}
|