Skip to content

Commit

Permalink
fix: Change the display of selection options in the mate card
Browse files Browse the repository at this point in the history
  • Loading branch information
cjeongmin committed May 29, 2024
1 parent 4840565 commit e9a6aaa
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/app/pages/shared-post-page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 <></>;
Expand Down

0 comments on commit e9a6aaa

Please sign in to comment.