File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change 11import React , { useEffect , useState } from "react" ;
22import platform from "platform" ;
33import { audacityReleases } from "../../assets/js/releaseData" ;
4+ import { trackEvent } from "../../utils/matomo" ;
45
56function 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 >
Original file line number Diff line number Diff 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 >
You can’t perform that action at this time.
0 commit comments