Skip to content

Commit

Permalink
Merge pull request #10998 from wellcomecollection/exhibitions-hardcopy
Browse files Browse the repository at this point in the history
Added logic to set exhibition format type in hardcopy subheadings
  • Loading branch information
georgiaewhitney authored Jul 9, 2024
2 parents a68982c + 019753e commit cf76fc6
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions content/webapp/components/Exhibition/Exhibition.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,11 @@ const Exhibition: FunctionComponent<Props> = ({
/>
);

const exhibitionFormat =
!exhibition.format || exhibition.format?.title === 'Permanent exhibition'
? 'Exhibition'
: exhibition.format.title;

return (
<ContentPage
id={exhibition.id}
Expand All @@ -287,7 +292,9 @@ const Exhibition: FunctionComponent<Props> = ({
>
{hasResources && (
<>
<h2 className={font('wb', 3)}>Exhibition access content</h2>
<h2
className={font('wb', 3)}
>{`${exhibitionFormat} access content`}</h2>
{(accessResourceLinks.length > 0 ||
exhibition.accessResourcesPdfs.length > 0) && (
<Space $v={{ size: 'l', properties: ['padding-bottom'] }}>
Expand Down Expand Up @@ -359,7 +366,7 @@ const Exhibition: FunctionComponent<Props> = ({
{(exhibitionOfs.length > 0 || pages.length > 0) && (
<SearchResults
items={[...exhibitionOfs, ...pages]}
title="In this exhibition"
title={`In this ${exhibitionFormat.toLowerCase()}`}
/>
)}

Expand Down

0 comments on commit cf76fc6

Please sign in to comment.