Skip to content

Commit 9f8af7a

Browse files
update home ui
1 parent 389da86 commit 9f8af7a

File tree

6 files changed

+10
-8
lines changed

6 files changed

+10
-8
lines changed

src/Components/Home/HomeContent/HomeContent.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ function HomeContent() {
88

99
return (
1010
<div className="w-1/2 h-full shadow-[0px_4px_4px_0px_rgba(0,0,0,0.25)] min-h-[calc(100vh_-_99px)] bg-[rgba(252,250,248,1)]">
11-
<div className="w-[700px] mx-auto">
11+
<div className="w-full 2xl:w-[700px] 2xl:mx-auto !2xl:px-0 px-9">
1212
<CreatePost/>
1313
<Posts/>
1414
</div>

src/Components/Posts/Post/Post.jsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,12 @@ function Post({ post }) {
4848
return (
4949
<div className='py-[30px] border-t-[6px] border-t-[rgba(235,235,235,1)] font-medium'>
5050
<PostHeader post={post} />
51+
<div className='px-5'>
5152
<PostContent post={post} />
5253
<PostDetails post={post} />
5354
<PostActions post={post} usersLikesThisPost={usersLikesThisPost} />
55+
</div>
56+
5457
{/* {usersCommentsOnPost.length>0&& <CommentSection fetchedComments={usersCommentsOnPost} /> } */}
5558
</div>
5659
);

src/Components/Posts/Post/PostActions/LikeButton.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ function LikeButton({post,usersLikesThisPost}) {
2121
}
2222
}
2323
return (
24-
<button onClick={likePostHandler} className='flex flex-row-reverse items-center gap-2 ' ><img src={likeIcon} alt='like icon' className={`${userLikedPost?'invert-[0.5]':''} w-4`}/>Like</button>
24+
<button onClick={likePostHandler} className='flex flex-row-reverse items-center gap-2 ' ><img src={likeIcon} alt='like icon' className={`${userLikedPost?'invert-[0.5]':''} w-5`}/>Like</button>
2525
)
2626
}
2727

src/Components/Posts/Post/PostActions/PostActions.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ import LikeButton from './LikeButton'
44
function PostActions({post,usersLikesThisPost}) {
55

66
return (
7-
<div className='flex justify-between text-base py-3'>
7+
<div className='flex justify-between text-base font-medium py-4'>
88
<LikeButton post={post} usersLikesThisPost={usersLikesThisPost}/>
9-
{actions.map((action,index)=><button className='flex flex-row-reverse items-center gap-2' key={index}><img className="w-4" src={action.icon}/><span>{action.text}</span></button>
9+
{actions.map((action,index)=><button className='flex flex-row-reverse items-center gap-3' key={index}><img className="w-5" src={action.icon}/><span>{action.text}</span></button>
1010
)}
1111
</div>
1212
)

src/Components/Posts/Post/PostDetails.jsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import React from 'react';
21

32
// Import your icons here
43
import commentIcon from '../../../assets/images/posts/image 79.svg';
@@ -15,8 +14,8 @@ function PostDetails({ post }) {
1514
return (
1615
<div className='flex justify-between py-4 border-b border-b-gray-300 border-b-opacity-100 border-b-solid border-b-[1.5px]'>
1716
{icons.map(({ count, icon, alt }, index) => (
18-
<p key={index} className='flex items-center gap-3 text-sm'>
19-
{count} <img src={icon} alt={alt} className='w-4'/>
17+
<p key={index} className='flex items-center gap-3 text-sm font-medium'>
18+
{count} <img src={icon} alt={alt} className='w-5'/>
2019
</p>
2120
))}
2221
</div>

src/Components/Posts/Posts.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {useSelector} from 'react-redux'
44
function Posts() {
55
const posts=useSelector(state=>state.posts).posts
66
return (
7-
<div >
7+
<div >
88
{posts.map(post=><Post post={post} key={post.id}/>)}
99

1010
</div>

0 commit comments

Comments
 (0)