Skip to content

Commit e56afed

Browse files
authored
Merge pull request #30 from CodeitPart3/COMPONENT-29-HONG
[feat] PostList 컴포넌트 생성
2 parents 793d30c + 194715a commit e56afed

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

src/components/Post/PostList.tsx

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import Post from "./Post";
2+
3+
interface PostData {
4+
id: string;
5+
name: string;
6+
imageUrl: string;
7+
address1: string;
8+
originalHourlyPay: number;
9+
link: string;
10+
hourlyPay: number;
11+
startsAt: string;
12+
workhour: number;
13+
closed: boolean;
14+
}
15+
16+
interface PostListProps {
17+
posts: PostData[];
18+
}
19+
20+
export default function PostList({ posts }: PostListProps) {
21+
return (
22+
<section className="grid grid-cols-2 xl:grid-cols-3 gap-x-2 gap-y-4 md:gap-x-[14px] md:gap-y-[32px]">
23+
{posts.map((post) => (
24+
<Post key={post.id} {...post} />
25+
))}
26+
</section>
27+
);
28+
}

0 commit comments

Comments
 (0)