Skip to content

Commit a8bdf18

Browse files
authored
Display multiple authors correctly (loic-sharma#574)
Previously, the author was displayed as `by: author1author2`. This fix makes it `by: author1 author2`.
1 parent bc6c1ff commit a8bdf18

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/BaGet.UI/src/SearchResults.test.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ describe('Tests for SearchResults component', () => {
3535
data: [
3636
{
3737
id: 'BaGet.Authors',
38-
authors: 'BaGet.Authors',
38+
authors: ['BaGet.Authors'],
3939
totalDownloads: 999,
4040
version: '1.0',
4141
tags: ['NuGet'],

src/BaGet.UI/src/SearchResults.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ interface ISearchResultsProps {
1414

1515
interface IPackage {
1616
id: string;
17-
authors: string;
17+
authors: string[];
1818
totalDownloads: number;
1919
version: string;
2020
tags: string[];
@@ -196,7 +196,7 @@ class SearchResults extends React.Component<ISearchResultsProps, ISearchResultsS
196196
<div className="col-sm-11">
197197
<div>
198198
<Link to={`/packages/${value.id}`} className="package-title">{value.id}</Link>
199-
<span>by: {value.authors}</span>
199+
<span>by: {value.authors.join(' ')}</span>
200200
</div>
201201
<ul className="info">
202202
<li>

0 commit comments

Comments
 (0)