This commit is contained in:
adueck 2024-05-04 15:40:32 +04:00
parent 8b6cdb1a1b
commit 31604be620
1 changed files with 5 additions and 6 deletions

View File

@ -27,13 +27,12 @@ export function EntryAudioDisplay({
}
function handleDownload() {
if (user && user.admin) {
return;
if (user && !user.admin) {
ReactGA.event({
category: "sounds",
action: `download ${entry.p} - ${entry.ts}`,
});
}
ReactGA.event({
category: "sounds",
action: `download ${entry.p} - ${entry.ts}`,
});
const documentName = `${entry.p}-${entry.ts}.mp3`;
fetch(audioPath)