From 440e0d65cca9ea186fc715294207c0397f58c0c9 Mon Sep 17 00:00:00 2001 From: Kasper Birch Date: Fri, 22 Nov 2024 13:32:43 +0100 Subject: [PATCH] Remove `MaterialButtonReaderTeaser` This component is redundant as its functionality can be replaced with `MaterialSecondaryLink`. --- .../online/MaterialButtonOnlineExternal.tsx | 12 ++++++-- .../online/MaterialButtonReaderTeaser.tsx | 29 ------------------- 2 files changed, 9 insertions(+), 32 deletions(-) delete mode 100644 src/components/material/material-buttons/online/MaterialButtonReaderTeaser.tsx diff --git a/src/components/material/material-buttons/online/MaterialButtonOnlineExternal.tsx b/src/components/material/material-buttons/online/MaterialButtonOnlineExternal.tsx index 30d640cefc..13db90f37e 100644 --- a/src/components/material/material-buttons/online/MaterialButtonOnlineExternal.tsx +++ b/src/components/material/material-buttons/online/MaterialButtonOnlineExternal.tsx @@ -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"; @@ -109,9 +109,15 @@ const MaterialButtonOnlineExternal: FC = ({ {hasReaderTeaser(manifestations) && ( - )} diff --git a/src/components/material/material-buttons/online/MaterialButtonReaderTeaser.tsx b/src/components/material/material-buttons/online/MaterialButtonReaderTeaser.tsx deleted file mode 100644 index 7e6b450fd5..0000000000 --- a/src/components/material/material-buttons/online/MaterialButtonReaderTeaser.tsx +++ /dev/null @@ -1,29 +0,0 @@ -import React from "react"; -import { useText } from "../../../../core/utils/text"; -import { ButtonSize } from "../../../../core/utils/types/button"; -import MaterialSecondaryLink from "../generic/MaterialSecondaryLink"; - -type MaterialButtonOnlineTeaserType = { - identifier: string; - size: ButtonSize; - dataCy?: string; -}; - -const MaterialButtonReaderTeaser = ({ - identifier, - size, - dataCy = "material-buttons-reader-teaser" -}: MaterialButtonOnlineTeaserType) => { - const t = useText(); - - return ( - - ); -}; - -export default MaterialButtonReaderTeaser;