From f0942a4040412819dccdc70d52f19a53c9d56319 Mon Sep 17 00:00:00 2001 From: 2paperstar Date: Fri, 17 Nov 2023 01:13:25 +0900 Subject: [PATCH] refactor: mypageTable style use overflow-hidden to clip support dark theme --- src/app/[lng]/mypage/MypageTable.tsx | 31 +++++++++++----------------- 1 file changed, 12 insertions(+), 19 deletions(-) diff --git a/src/app/[lng]/mypage/MypageTable.tsx b/src/app/[lng]/mypage/MypageTable.tsx index 2f4ad0a5..34823c3c 100644 --- a/src/app/[lng]/mypage/MypageTable.tsx +++ b/src/app/[lng]/mypage/MypageTable.tsx @@ -30,13 +30,11 @@ interface MypageTableProps { link: string; } -interface UnderLinedTextProps { - text: string; -} - -const UnderLinedText = ({ text }: UnderLinedTextProps) => { +const UnderLinedText = ({ children }: React.PropsWithChildren) => { return ( -
{text}
+
+ {children} +
); }; @@ -48,38 +46,33 @@ const MypageTable = async ({ }: MypageTableProps & { lng: Locale }) => { const { t } = await createTranslation(lng, 'translation'); return ( -
-
-
+
+
+
{title}
- + {t('mypage.totalList')}
{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}
-
+
{dayjs(articleObj.createdAt).format('YYYY-MM-DD')}