Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SFR-1898: Combine publisher lists on edition page #486

Merged
merged 1 commit into from
Mar 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
- Remove featured edition logic from frontend
- Chore: Add Krist, Jiayong, and Olivia as codeowners
- Add APP_ENV to yml files and update newrelic to v11.12.0
- Fix: Improve accessibility of Edition Details publishers list

## [0.17.6]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@ import { ApiEdition } from "~/src/types/EditionQuery";
import { Agent } from "~/src/types/DataModel";

// Publisher
const getPublishersList = (publishers: Agent[]): JSX.Element[] => {
const getPublishersList = (publishers: Agent[]): JSX.Element => {
if (!publishers || publishers.length === 0) {
return [
<React.Fragment key="unavailable">Publisher Unavailable</React.Fragment>,
];
}
return publishers.map((publisher: Agent) => {
return (
<List type="ul" key={publisher.name} noStyling>
<li>{publisher.name}</li>
</List>
<React.Fragment key="unavailable">Publisher Unavailable</React.Fragment>
);
});
}
return (
<List type="ul" noStyling>
{publishers.map((publisher: Agent) => {
return <li key={publisher.name}>{publisher.name}</li>;
})}
</List>
);
};

export const EditionDetailDefinitionList: React.FC<{ edition: ApiEdition }> = ({
Expand Down
Loading