File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -4,16 +4,26 @@ import { BaseLink, type LinkProps } from "@/components/Link"
4
4
import { type MatomoEventOptions , trackCustomEvent } from "@/lib/utils/matomo"
5
5
6
6
export type ButtonLinkProps = LinkProps &
7
- Omit < ButtonProps , "toId" | "onClick" > & {
7
+ Omit < ButtonProps , "toId" > & {
8
8
customEventOptions ?: MatomoEventOptions
9
9
}
10
10
11
- const ButtonLink = ( { customEventOptions, ...props } : ButtonLinkProps ) => {
11
+ const ButtonLink = ( {
12
+ customEventOptions,
13
+ onClick,
14
+ ...props
15
+ } : ButtonLinkProps ) => {
12
16
const handleClick = ( ) => {
13
17
customEventOptions && trackCustomEvent ( customEventOptions )
14
18
}
19
+
15
20
return (
16
- < Button as = { BaseLink } activeStyle = { { } } { ...props } onClick = { handleClick } />
21
+ < Button
22
+ as = { BaseLink }
23
+ activeStyle = { { } }
24
+ { ...props }
25
+ onClick = { onClick ? onClick : handleClick }
26
+ />
17
27
)
18
28
}
19
29
You can’t perform that action at this time.
0 commit comments