Skip to content

Commit 8201c9a

Browse files
Prevent link clicks from triggering accordion
1 parent f0e0308 commit 8201c9a

1 file changed

Lines changed: 26 additions & 5 deletions

File tree

src/pages/publications/Publication.tsx

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,11 @@ export function Publication({ data }: { data: PublicationData }) {
4747
<Group justify="space-between" wrap="nowrap" align="end">
4848
<Group gap={"xs"}>
4949
{data.pdf && (
50-
<Anchor href={data.pdf} target="_blank">
50+
<Anchor
51+
href={data.pdf}
52+
target="_blank"
53+
onClick={(e) => e.stopPropagation()}
54+
>
5155
<Flex align={"center"} gap={4}>
5256
<FaRegFilePdf size={IconSize.xs} />
5357
PDF
@@ -56,28 +60,45 @@ export function Publication({ data }: { data: PublicationData }) {
5660
)}
5761

5862
{data.bib && (
59-
<Anchor href={data.bib} target="_blank" download>
63+
<Anchor
64+
href={data.bib}
65+
target="_blank"
66+
download
67+
onClick={(e) => e.stopPropagation()}
68+
>
6069
BibTeX
6170
</Anchor>
6271
)}
6372
{data.code && (
64-
<Anchor href={data.code} target="_blank">
73+
<Anchor
74+
href={data.code}
75+
target="_blank"
76+
onClick={(e) => e.stopPropagation()}
77+
>
6578
<Flex align={"center"} gap={4}>
6679
<FaCode size={IconSize.xs} />
6780
Code
6881
</Flex>{" "}
6982
</Anchor>
7083
)}
7184
{data.doi && (
72-
<Anchor href={data.doi} target="_blank">
85+
<Anchor
86+
href={data.doi}
87+
target="_blank"
88+
onClick={(e) => e.stopPropagation()}
89+
>
7390
<Flex align={"center"} gap={4}>
7491
<SiDoi size={IconSize.xs} />
7592
DOI
7693
</Flex>
7794
</Anchor>
7895
)}
7996
{data.website && (
80-
<Anchor href={data.website} target="_blank">
97+
<Anchor
98+
href={data.website}
99+
target="_blank"
100+
onClick={(e) => e.stopPropagation()}
101+
>
81102
<Flex align={"center"} gap={4}>
82103
<FaCloud size={IconSize.xs} />
83104
Web

0 commit comments

Comments
 (0)