Skip to content

Commit 0857d8a

Browse files
updated to use LinkButton instead
1 parent 589b75d commit 0857d8a

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import {
2-
Button,
2+
LinkButton,
33
SvgArrowRightStraight,
44
} from '@guardian/source/react-components';
55

@@ -10,15 +10,15 @@ type ProductLinkButtonProps = {
1010

1111
export const ProductLinkButton = ({ label, url }: ProductLinkButtonProps) => {
1212
return (
13-
<Button
14-
onClick={() => {
15-
window.open(url, '_blank');
16-
}}
13+
<LinkButton
14+
href={url}
15+
target="_blank"
16+
rel="noopener noreferrer"
1717
iconSide="right"
1818
aria-label={`Open ${label} in a new tab`}
1919
icon={<SvgArrowRightStraight />}
2020
>
2121
{label}
22-
</Button>
22+
</LinkButton>
2323
);
2424
};

0 commit comments

Comments
 (0)