Skip to content

Commit

Permalink
Add language attribute to title header in WorkPageHeader component ba…
Browse files Browse the repository at this point in the history
…sed on work ISO code
  • Loading branch information
Adamik10 committed Dec 3, 2024
1 parent a8a846e commit fdd7c16
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion components/pages/workPageLayout/WorkPageHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import WorkPageButtons from "./WorkPageButtons"
import {
getIsbnsFromManifestation,
getManifestationByMaterialType,
getManifestationLanguageIsoCode,
getWorkMaterialTypes,
} from "./helper"

Expand Down Expand Up @@ -74,6 +75,7 @@ const WorkPageHeader = ({ work }: WorkPageHeaderProps) => {
})
})
}
const languageIsoCode = getManifestationLanguageIsoCode(selectedManifestation)

useEffect(() => {
setinitialSliderValue(findInitialSliderValue())
Expand Down Expand Up @@ -118,7 +120,9 @@ const WorkPageHeader = ({ work }: WorkPageHeaderProps) => {
BLÅ
</Badge>
)}
<h1 className="hyphens-auto break-words text-typo-heading-3 lg:mt-0 lg:text-typo-heading-2">
<h1
lang={languageIsoCode}
className="hyphens-auto break-words text-typo-heading-3 lg:mt-0 lg:text-typo-heading-2">
{`${selectedManifestation?.titles?.full || ""}${!!titleSuffix ? ` (${titleSuffix})` : ""}`}
</h1>
<p className="mt-grid-gap-2 text-typo-caption uppercase lg:mt-7">{`af ${displayCreators(work.creators, 100)}`}</p>
Expand Down

0 comments on commit fdd7c16

Please sign in to comment.