From 6c8ae4678ad7b09cac81a8a9b779ed7682580ca0 Mon Sep 17 00:00:00 2001 From: GanghyeonSeo Date: Fri, 7 Jun 2024 15:50:41 +0900 Subject: [PATCH] fix: PostListPage style --- src/pages/PostListPage.tsx | 53 +++++++++++++++++++++++++------------- 1 file changed, 35 insertions(+), 18 deletions(-) diff --git a/src/pages/PostListPage.tsx b/src/pages/PostListPage.tsx index aa5eb9b..bb59bea 100644 --- a/src/pages/PostListPage.tsx +++ b/src/pages/PostListPage.tsx @@ -8,36 +8,53 @@ const PostListPage = () => { const { data } = useSWR<{ total: number; list: Post[] }>('/post'); return ( - - + + + + + + +
- Id - Title - Author - Views - CreatedAt + Id + Title + Author + Views + CreatedAt {data?.list.map((post) => ( - - {post.id} - + + + {post.id} + + {post.contents.title} - {post.author.name} - {post.views} - {post.createdAt} + + {post.author.name} + + {post.views} + + {post.createdAt.substring(0, 10)} + ))}
- - - - -
); };