forked from microsoft/github-copilot-vibe-coding-workshop
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPostList.jsx
More file actions
25 lines (23 loc) · 696 Bytes
/
Copy pathPostList.jsx
File metadata and controls
25 lines (23 loc) · 696 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import PostItem from './PostItem';
import SearchBar from './SearchBar';
const PostList = ({ posts, onLike, onComment, onSearch }) => {
return (
<div className="w-[760px] h-[832px] bg-[#E5A000] rounded-[20px] overflow-y-auto">
<SearchBar onSearch={onSearch} />
<div className="w-full h-[3px] bg-white"></div>
{posts.map((post, index) => (
<div key={post.id}>
<PostItem
post={post}
onLike={onLike}
onComment={onComment}
/>
{index < posts.length - 1 && (
<div className="w-full h-[2px] bg-white"></div>
)}
</div>
))}
</div>
);
};
export default PostList;