From 31604be620bbca4a0e301a8194d23b98fc45f5ac Mon Sep 17 00:00:00 2001 From: adueck Date: Sat, 4 May 2024 15:40:32 +0400 Subject: [PATCH] oops --- website/src/components/EntryAudioDisplay.tsx | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/website/src/components/EntryAudioDisplay.tsx b/website/src/components/EntryAudioDisplay.tsx index f4dd07f..41cdaee 100644 --- a/website/src/components/EntryAudioDisplay.tsx +++ b/website/src/components/EntryAudioDisplay.tsx @@ -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)