Skip to content

Commit 34a541e

Browse files
DilsonsPicklesLWinterberg
authored andcommitted
Fix download buttons
1 parent a846b2f commit 34a541e

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/components/button/DownloadButton.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import React, { useEffect, useState } from "react";
22
import platform from "platform";
33
import { audacityReleases } from "../../assets/js/releaseData";
4+
import { trackEvent } from "../../utils/matomo";
45

56
function DownloadButton() {
67
const [browserOS, setBrowserOS] = useState("");
@@ -11,13 +12,11 @@ function DownloadButton() {
1112

1213
function handleButtonClick(href) {
1314
if (href !== "/download") {
14-
if (typeof _paq !== "undefined") {
1515
trackEvent(
1616
"Download Button",
1717
"Download Muse Hub",
1818
`Download Muse Hub button ${platform.os.family}`
1919
);
20-
}
2120
}
2221

2322
setTimeout(() => {
@@ -30,6 +29,7 @@ function DownloadButton() {
3029
<a
3130
onClick={() => handleButtonClick(href)}
3231
className="text-white font-semibold hover:underline"
32+
href={href}
3333
>
3434
Download without Muse Hub
3535
</a>

src/components/button/DownloadMuseHubButton.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ function DownloadMuseHubButton() {
4646
<a
4747
onClick={() => handleButtonClick(href)}
4848
className="flex py-3 px-4 gap-3 rounded-md justify-center bg-yellow-300 hover:bg-yellow-400 active:bg-yellow-500 w-fit"
49+
href={href}
4950
>
5051
<span className="icon icon-import"></span>
5152
<p>

0 commit comments

Comments
 (0)