Skip to content

Commit 9d1e5c4

Browse files
Rename MuseHub download button
1 parent 12106a4 commit 9d1e5c4

File tree

2 files changed

+21
-7
lines changed

2 files changed

+21
-7
lines changed
Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,23 @@
11
import React from "react";
22

3-
function AudacityInstallerButton(props) {
3+
function PlatformDownloadMuseHubButton(props) {
44
const { museHubReleaseData } = props;
5+
56
function onClickButtonHandler() {
7+
if (typeof _paq !== "undefined") {
8+
_paq.push([
9+
"trackEvent",
10+
"Download Button",
11+
"Download Muse Hub",
12+
`Download Muse Hub button ${OS}`,
13+
]);
14+
}
15+
616
setTimeout(() => {
7-
window.location.href = "/post-download";
8-
}, 2000);
17+
window.location.href = "/post-download";
18+
}, 2000);
919
}
10-
20+
1121
return (
1222
<a
1323
onClick={onClickButtonHandler}
@@ -19,4 +29,4 @@ function AudacityInstallerButton(props) {
1929
);
2030
}
2131

22-
export default AudacityInstallerButton;
32+
export default PlatformDownloadMuseHubButton;

src/layouts/DownloadPageLayout.astro

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import BaseLayout from "./BaseLayout.astro";
33
import DownloadCard from "../components/card/DownloadCard";
44
import IconLinkCard from "../components/card/IconLinkCard";
5-
import AudacityInstallerButton from "../components/button/AudacityInstallerButton";
5+
import PlatformDownloadMuseHubButton from "../components/button/PlatformDownloadMuseHubButton";
66
import { Icon } from "astro-icon";
77
import "../styles/icons.css";
88
import {
@@ -69,7 +69,11 @@ const {
6969
<p>via Muse Hub</p>
7070
</div>
7171

72-
<AudacityInstallerButton client:load museHubReleaseData={museHubReleaseData} />
72+
<PlatformDownloadMuseHubButton
73+
client:load
74+
museHubReleaseData={museHubReleaseData}
75+
OS={OS}
76+
/>
7377
</div>
7478
</div>
7579
</section>

0 commit comments

Comments
 (0)