From e9a6aaa6a28fd61eb72f78552e38b31289d9bf68 Mon Sep 17 00:00:00 2001 From: cjeongmin Date: Thu, 30 May 2024 01:02:32 +0900 Subject: [PATCH] fix: Change the display of selection options in the mate card --- src/app/pages/shared-post-page.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/app/pages/shared-post-page.tsx b/src/app/pages/shared-post-page.tsx index 8f4d0d5..236d05a 100644 --- a/src/app/pages/shared-post-page.tsx +++ b/src/app/pages/shared-post-page.tsx @@ -592,7 +592,14 @@ export function SharedPostPage({ if (post == null) return '없어요'; const value = JSON.parse(post.data.roomMateFeatures.options) as string[]; if (value == null) return '없어요'; - return value.join(', '); + return value + .map(elem => + ['상', '평범보통', '천하태평'].includes(elem) + ? `깔끔 정도: ${elem}` + : elem, + ) + .filter(elem => !Array.isArray(elem)) + .join(', '); }, [post]); if (isLoading || post == null) return <>;