Skip to content

Commit

Permalink
Remove MaterialButtonReaderTeaser
Browse files Browse the repository at this point in the history
This component is redundant as its functionality can be replaced with `MaterialSecondaryLink`.
  • Loading branch information
kasperbirch1 committed Nov 22, 2024
1 parent c6c6cb7 commit 2847ee8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { ButtonSize } from "../../../../core/utils/types/button";
import { Manifestation } from "../../../../core/utils/types/entities";
import { ManifestationMaterialType } from "../../../../core/utils/types/material-type";
import LinkButton from "../../../Buttons/LinkButton";
import MaterialButtonReaderTeaser from "./MaterialButtonReaderTeaser";
import MaterialSecondaryLink from "../generic/MaterialSecondaryLink";
import { getManifestationIsbn } from "../../../../apps/material/helper";
import { hasReaderTeaser } from "../../../../apps/reader/helper";

Expand Down Expand Up @@ -109,9 +109,15 @@ const MaterialButtonOnlineExternal: FC<MaterialButtonOnlineExternalProps> = ({
</LinkButton>

{hasReaderTeaser(manifestations) && (
<MaterialButtonReaderTeaser
<MaterialSecondaryLink
label={t("onlineMaterialTeaserText")}
size={size || "large"}
identifier={getManifestationIsbn(manifestations[0])}
url={
new URL(
`/reader?identifier=${getManifestationIsbn(manifestations[0])}`,
window.location.href
)
}
dataCy={`${dataCy}-teaser`}
/>
)}
Expand Down

This file was deleted.

0 comments on commit 2847ee8

Please sign in to comment.