From c115974b26d3fe880fbc1bb2f5db2352aa3c8a9d Mon Sep 17 00:00:00 2001 From: Okke Harsta Date: Tue, 7 Nov 2023 10:42:52 +0100 Subject: [PATCH] Attempt to not have inline script execution --- client/src/pages/Home.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/client/src/pages/Home.js b/client/src/pages/Home.js index 040ff297..68f43be3 100644 --- a/client/src/pages/Home.js +++ b/client/src/pages/Home.js @@ -72,6 +72,10 @@ export const Home = () => { navigate(`/home/${name}`); } + const playOwl = () => { + new Audio(owl).play() + } + if (loading) { return } @@ -79,7 +83,7 @@ export const Home = () => {
new Audio(owl).play()}> + svgClick={() => playOwl()}>

{I18n.t("header.subTitle")}