Skip to content

Commit

Permalink
feature: add authors title
Browse files Browse the repository at this point in the history
  • Loading branch information
xxxjinn committed Aug 1, 2024
1 parent 0283110 commit 7d04982
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 14 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
.selected-container {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 15px;
width: 100%;
padding: 6px;
}

.selected-content {
display: flex;
flex-wrap: wrap;
box-sizing: border-box;
}
27 changes: 15 additions & 12 deletions packages/view/src/components/FilteredAuthors/FilteredAuthors.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,21 @@ const FilteredAuthors = () => {

return (
<div className="selected-container">
{authSrcMap &&
selectedClusters.map((selectedCluster) => {
return selectedCluster.summary.authorNames.map((authorArray: string[]) => {
return authorArray.map((authorName: string) => (
<Author
key={authorName}
name={authorName}
src={authSrcMap[authorName]}
/>
));
});
})}
{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) => (
<Author
key={authorName}
name={authorName}
src={authSrcMap[authorName]}
/>
));
});
})}
</div>
</div>
);
};
Expand Down

0 comments on commit 7d04982

Please sign in to comment.