Skip to content

Commit

Permalink
Change author & description from P-tags to Links for recommended-mate…
Browse files Browse the repository at this point in the history
…rial

This makes it possible to click on the author and description texts for a recommended material, and go to the linked material.

DDFFORM-497
  • Loading branch information
LasseStaus committed Apr 9, 2024
1 parent 0c2ec47 commit 5669488
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/apps/recommended-material/RecommendedMaterial.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import { DisplayMaterialType } from "../../core/utils/types/material-type";
import { useUrls } from "../../core/utils/url";
import { getManifestationBasedOnType } from "../material/helper";
import RecommendedMaterialSkeleton from "./RecommendedMaterialSkeleton";
import Link from "../../components/atoms/links/Link";

export type RecommendedMaterialProps = {
wid: WorkId;
Expand Down Expand Up @@ -98,18 +99,20 @@ const RecommendedMaterial: React.FC<RecommendedMaterialProps> = ({
shadow="medium"
/>
<div className="recommended-material__texts">
<p
<Link
href={materialFullUrl}
className="recommended-material__description"
data-cy="recommended-description"
>
{fullTitle}
</p>
<p
</Link>
<Link
href={materialFullUrl}
className="recommended-material__author"
data-cy="recommended-author"
>
{author}{" "}
</p>
{author}
</Link>
</div>
</div>
);
Expand Down

0 comments on commit 5669488

Please sign in to comment.