diff --git a/apps/scandic-web/components/ContentCard/contentCard.ts b/apps/scandic-web/components/ContentCard/contentCard.ts index b18ebf0e4..3c40c5cbc 100644 --- a/apps/scandic-web/components/ContentCard/contentCard.ts +++ b/apps/scandic-web/components/ContentCard/contentCard.ts @@ -12,10 +12,3 @@ export interface ContentCardProps { promoText?: string className?: string } - -export interface ContentCardLinkProps { - href: string - openInNewTab?: boolean - isExternal?: boolean - children: React.ReactNode -} diff --git a/apps/scandic-web/components/ContentCard/index.tsx b/apps/scandic-web/components/ContentCard/index.tsx index b67842a58..a77bc66f8 100644 --- a/apps/scandic-web/components/ContentCard/index.tsx +++ b/apps/scandic-web/components/ContentCard/index.tsx @@ -6,7 +6,7 @@ import Subtitle from "@/components/TempDesignSystem/Text/Subtitle" import styles from "./contentCard.module.css" -import type { ContentCardLinkProps, ContentCardProps } from "./contentCard" +import type { ContentCardProps } from "./contentCard" export default function ContentCard({ heading, @@ -40,31 +40,16 @@ export default function ContentCard({ if (!link) return card - return ( - - {card} - - ) -} - -function ContentCardLink({ - children, - href, - openInNewTab, - isExternal, -}: ContentCardLinkProps) { - const Component = isExternal ? "a" : Link const linkProps = { - href, - ...(openInNewTab && { + ...(link.openInNewTab && { target: "_blank", rel: "noopener noreferrer", }), } - return {children} + return ( + + {card} + + ) }