From 0e12e85c82a5f4d0bf1d5a5f0e12af176f96bd92 Mon Sep 17 00:00:00 2001 From: 2paperstar Date: Fri, 17 Nov 2023 01:05:51 +0900 Subject: [PATCH] refactor: remove unnecessary rendering condition --- src/app/[lng]/mypage/MypageTable.tsx | 43 ++++++++++++++-------------- 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/src/app/[lng]/mypage/MypageTable.tsx b/src/app/[lng]/mypage/MypageTable.tsx index 5c3e4e4d..2f4ad0a5 100644 --- a/src/app/[lng]/mypage/MypageTable.tsx +++ b/src/app/[lng]/mypage/MypageTable.tsx @@ -61,33 +61,32 @@ const MypageTable = async ({ - {articles.length > 0 && - articles.map((articleObj, index) => { - const isLastRow = index === articles.length - 1; - const borderBottomRadius = isLastRow ? '10px' : '0px'; - const underLine = isLastRow ? '' : 'border-b border-gray-300'; - return ( + {articles.map((articleObj, index) => { + const isLastRow = index === articles.length - 1; + const borderBottomRadius = isLastRow ? '10px' : '0px'; + const underLine = isLastRow ? '' : 'border-b border-gray-300'; + return ( +
-
-
- {articleObj.title} -
+
+ {articleObj.title}
-
-
- {dayjs(articleObj.createdAt).format('YYYY-MM-DD')} -
+
+
+
+ {dayjs(articleObj.createdAt).format('YYYY-MM-DD')}
- ); - })} +
+ ); + })} {articles.length === 0 && (