Skip to content

Commit

Permalink
fix: userNames 렌더링 방식 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
simeunseo committed Jun 23, 2024
1 parent 15c7966 commit 59d24bc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 13 deletions.
12 changes: 5 additions & 7 deletions src/pages/OverallSchedule/components/Title.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,11 @@ function Title({ memberCount, totalUserNames }: TitleProps) {
</Text>
</TextOneLine>
<TotalUserNames>
{totalUserNames &&
totalUserNames.map((name, idx) => (
<Text key={idx + name} font={'body4'} color={`${theme.colors.grey5}`}>
{name}
{idx !== totalUserNames.length - 1 ? ',' : ''}&nbsp;
</Text>
))}
{totalUserNames && (
<Text font={'body4'} color={`${theme.colors.grey5}`}>
{totalUserNames.join(',')}
</Text>
)}
</TotalUserNames>
</>
);
Expand Down
9 changes: 3 additions & 6 deletions src/pages/OverallSchedule/components/UserNames.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,9 @@ function UserNames() {
</Text>
</Texts>
) : (
clickedUserNames.map((name, idx) => (
<Text key={idx + name} font={'body2'} color={`${theme.colors.grey2}`}>
{name}
{idx !== clickedUserNames.length - 1 ? ',' : ''}&nbsp;
</Text>
))
<Text font={'body2'} color={theme.colors.grey2}>
{clickedUserNames.join(', ')}
</Text>
)}
</UserNamesWrapper>
);
Expand Down

0 comments on commit 59d24bc

Please sign in to comment.