Skip to content

Commit

Permalink
충돌 해결
Browse files Browse the repository at this point in the history
  • Loading branch information
HIITMEMARIO committed Aug 2, 2024
1 parent 9ac29fd commit 1367cbf
Showing 1 changed file with 22 additions and 19 deletions.
41 changes: 22 additions & 19 deletions packages/view/src/components/FilteredAuthors/FilteredAuthors.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,26 +15,29 @@ const FilteredAuthors = () => {

return (
<div className="selected-container">
{authSrcMap &&
selectedClusters.map((selectedCluster) => {
return selectedCluster.summary.authorNames.map((authorArray: string[]) => {
return authorArray.map((authorName: string) => {
// 이미 추가된 사용자인지 확인 후 추가되지 않은 경우에만 추가하고 Set에 이름을 저장
if (!addedAuthors.has(authorName)) {
addedAuthors.add(authorName);
return (
<Author
key={authorName}
name={authorName}
src={authSrcMap[authorName]}
/>
);
}
// 이미 추가된 사용자인 경우 null 반환
return null;
{selectedClusters.length > 0 && <p>Authors:</p>}
<div className="selected-content">
{authSrcMap &&
selectedClusters.map((selectedCluster) => {
return selectedCluster.summary.authorNames.map((authorArray: string[]) => {
return authorArray.map((authorName: string) => {
// 이미 추가된 사용자인지 확인 후 추가되지 않은 경우에만 추가하고 Set에 이름을 저장
if (!addedAuthors.has(authorName)) {
addedAuthors.add(authorName);
return (
<Author
key={authorName}
name={authorName}
src={authSrcMap[authorName]}
/>
);
}
// 이미 추가된 사용자인 경우 null 반환
return null;
});
});
});
})}
})}
</div>
</div>
);
};
Expand Down

0 comments on commit 1367cbf

Please sign in to comment.