Commit 2f8f2caf authored by Magnus Westergaard's avatar Magnus Westergaard
Browse files

DEICH-5553: Display production company for games.

parent c03fa44c
......@@ -20,6 +20,7 @@ import {
AUTHOR,
EDITOR,
ILLUSTRATOR,
PRODUCTION_COMPANY,
READER,
TRANSLATOR
} from "../../constants/roles";
......@@ -53,7 +54,7 @@ const detailsSelectors = {
],
[FILM]: [topContributorDetails, publishedDetails, seriesDetails],
[MUSIC_RECORDING]: [topContributorDetails, publishedDetails, seriesDetails],
[GAME]: [publisherDetails, publishedDetails, seriesDetails]
[GAME]: [productionCompanyDetails, publishedDetails, seriesDetails]
};
export default function HighlightedWorkDetails({ work, publication }) {
......@@ -141,12 +142,14 @@ function publishedFagDetails({ publicationYear, fictionNonfiction }) {
}
}
function publisherDetails({ publishers = [] }) {
const primary = publishers[0];
if (primary) {
function productionCompanyDetails({ contributors }) {
const productionCompany = contributors.find(
c => c.role === PRODUCTION_COMPANY
);
if (productionCompany) {
return {
title: "Produksjonsselskap",
description: <>{primary.name}</>
description: <>{productionCompany.agent.name}</>
};
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment