Skip to content

Commit

Permalink
Ensure tracks event is recorded when CMD+clicking link
Browse files Browse the repository at this point in the history
  • Loading branch information
Jinksi committed Sep 18, 2023
1 parent fa71276 commit e6e38ea
Showing 1 changed file with 36 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,17 +70,19 @@ const DisputeUnderReviewFooter: React.FC< {
path: '/payments/disputes/challenge',
id: dispute?.id,
} ) }
onClick={ () => {
wcpayTracks.recordEvent(
wcpayTracks.events
.PAYMENT_DETAILS_VIEW_DISPUTE_EVIDENCE_BUTTON_CLICK,
{
dispute_status: dispute.status,
}
);
} }
>
<Button variant="secondary">
<Button
variant="secondary"
onClick={ () => {
wcpayTracks.recordEvent(
wcpayTracks.events
.PAYMENT_DETAILS_VIEW_DISPUTE_EVIDENCE_BUTTON_CLICK,
{
dispute_status: dispute.status,
}
);
} }
>
{ __(
'View submitted evidence',
'woocommerce-payments'
Expand Down Expand Up @@ -139,17 +141,19 @@ const DisputeWonFooter: React.FC< {
path: '/payments/disputes/challenge',
id: dispute?.id,
} ) }
onClick={ () => {
wcpayTracks.recordEvent(
wcpayTracks.events
.PAYMENT_DETAILS_VIEW_DISPUTE_EVIDENCE_BUTTON_CLICK,
{
dispute_status: dispute.status,
}
);
} }
>
<Button variant="secondary">
<Button
variant="secondary"
onClick={ () => {
wcpayTracks.recordEvent(
wcpayTracks.events
.PAYMENT_DETAILS_VIEW_DISPUTE_EVIDENCE_BUTTON_CLICK,
{
dispute_status: dispute.status,
}
);
} }
>
{ __(
'View dispute details',
'woocommerce-payments'
Expand Down Expand Up @@ -245,17 +249,19 @@ const DisputeLostFooter: React.FC< {
path: '/payments/disputes/challenge',
id: dispute?.id,
} ) }
onClick={ () => {
wcpayTracks.recordEvent(
wcpayTracks.events
.PAYMENT_DETAILS_VIEW_DISPUTE_EVIDENCE_BUTTON_CLICK,
{
dispute_status: dispute.status,
}
);
} }
>
<Button variant="secondary">
<Button
variant="secondary"
onClick={ () => {
wcpayTracks.recordEvent(
wcpayTracks.events
.PAYMENT_DETAILS_VIEW_DISPUTE_EVIDENCE_BUTTON_CLICK,
{
dispute_status: dispute.status,
}
);
} }
>
{ __(
'View dispute details',
'woocommerce-payments'
Expand Down

0 comments on commit e6e38ea

Please sign in to comment.