diff --git a/components/shared/infoBox/InfoBox.tsx b/components/shared/infoBox/InfoBox.tsx index e7892e2..cf75a4e 100644 --- a/components/shared/infoBox/InfoBox.tsx +++ b/components/shared/infoBox/InfoBox.tsx @@ -28,20 +28,29 @@ const InfoBox = ({ work }: InfoBoxProps) => {
{!!selectedManifestation?.audience?.ages.length && ( - age.display)} - /> + <> +
+ age.display)} + /> + )} {!!selectedManifestation?.series?.length && ( - + <> +
+ + )} {!!selectedManifestation?.subjects.all?.length && ( - subject.display)} - isButtons - /> + <> +
+ subject.display)} + isButtons + /> + )}
diff --git a/components/shared/infoBox/InfoBoxDetails.tsx b/components/shared/infoBox/InfoBoxDetails.tsx index 55a3cfe..d116cac 100644 --- a/components/shared/infoBox/InfoBoxDetails.tsx +++ b/components/shared/infoBox/InfoBoxDetails.tsx @@ -23,57 +23,83 @@ const InfoBoxDetails = ({ work }: InfoBoxDetailsProps) => {
{!!selectedManifestation && ( - type.materialTypeGeneral.display - )} - /> + <> +
+ type.materialTypeGeneral.display + )} + /> + )} {!!selectedManifestation?.languages?.main?.length && ( - language.display)} - /> + <> +
+ language.display + )} + /> + )} {!!selectedManifestation?.physicalDescription?.summaryFull && ( - + <> +
+ + )} {!!selectedManifestation?.dateFirstEdition?.display || (work.workYear?.display && ( - + <> +
+ + ))}
{!!selectedManifestation?.genreAndForm?.length && ( - + <> +
+ + )} {!!selectedManifestation?.identifiers?.length && !!getIsbnsFromManifestation(selectedManifestation)?.length && ( - + <> +
+ + )} {!!selectedManifestation?.publisher?.length && ( - + <> +
+ + )} {(!!selectedManifestation?.contributors?.length || !!selectedManifestation?.contributorsFromDescription?.length) && ( - item.display) - .concat(selectedManifestation?.contributorsFromDescription)} - /> + <> +
+ item.display) + .concat(selectedManifestation?.contributorsFromDescription)} + /> + )}
diff --git a/components/shared/infoBox/InfoBoxItem.tsx b/components/shared/infoBox/InfoBoxItem.tsx index 9073a2a..a151543 100644 --- a/components/shared/infoBox/InfoBoxItem.tsx +++ b/components/shared/infoBox/InfoBoxItem.tsx @@ -20,17 +20,16 @@ const InfoBoxItem = ({ term, description, isButtons = false }: InfoBoxItemProps) return ( <> -
{term}
{!isButtons &&
{description.join(", ")}
} {isButtons && ( -
+
{description.map(item => ( ))} -
+ )} )