Skip to content

Commit

Permalink
refactor: make author text display similar (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
IgboPharaoh authored Oct 17, 2023
1 parent 2046809 commit 6589c37
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/app/components/server/post.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const Post = ({entry, isActivePost}: {entry: HomepageEntryData; isActivePost: bo
{entry.authors[0]}
</p>
</div>
{isActivePost && <ContributorsList contributors={entry.contributors} />}
<ContributorsList contributors={entry.contributors} />
</div>
<div>
<SummaryList summary={entry.summary} />
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const createPath = (path: string) => {
};

export const getContributors = (authors: Array<string>) => {
return authors.length <= 1 ? [] : authors.slice(1);
return authors.length <= 1 ? [] : Array.from(new Set(authors.slice(1))).filter((author) => author !== authors[0]);
};

export const createSummary = (summary: string) => {
Expand Down

0 comments on commit 6589c37

Please sign in to comment.