diff --git a/package-lock.json b/package-lock.json
index e3d112a1fb9d00bd734d8c6899d50217003d6f13..af9fa642afd8acebf01405c436e164ac2e77de19 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -10194,6 +10194,11 @@
"resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz",
"integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw=="
},
+ "node_modules/howler": {
+ "version": "2.2.4",
+ "resolved": "https://registry.npmjs.org/howler/-/howler-2.2.4.tgz",
+ "integrity": "sha512-iARIBPgcQrwtEr+tALF+rapJ8qSc+Set2GJQl7xT1MQzWaVkFebdJhR3alVlSiUf5U7nAANKuj3aWpwerocD5w=="
+ },
"node_modules/html-minifier-terser": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/html-minifier-terser/-/html-minifier-terser-7.2.0.tgz",
@@ -15506,6 +15511,17 @@
}
}
},
+ "node_modules/use-sound": {
+ "version": "4.0.3",
+ "resolved": "https://registry.npmjs.org/use-sound/-/use-sound-4.0.3.tgz",
+ "integrity": "sha512-L205pEUFIrLsGYsCUKHQVCt0ajs//YQOFbEQeNwaWaqQj3y3st4SuR+rvpMHLmv8hgTcfUFlvMQawZNI3OE18w==",
+ "dependencies": {
+ "howler": "^2.1.3"
+ },
+ "peerDependencies": {
+ "react": ">=16.8"
+ }
+ },
"node_modules/util-deprecate": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
@@ -16285,7 +16301,8 @@
"react-dom": "^18.2.0",
"react-toastify": "^10.0.5",
"react-zoom-pan-pinch": "^3.4.1",
- "socket.io-client": "^4.7.4"
+ "socket.io-client": "^4.7.4",
+ "use-sound": "^4.0.3"
},
"devDependencies": {
"@tsconfig/vite-react": "^3.0.0",
diff --git a/packages/client/package.json b/packages/client/package.json
index 82d621eb071ee11ee6ff7e2049fa157391792914..c38aa9a9561ac2979271b671259d217ed1afd178 100644
--- a/packages/client/package.json
+++ b/packages/client/package.json
@@ -38,7 +38,8 @@
"react-dom": "^18.2.0",
"react-toastify": "^10.0.5",
"react-zoom-pan-pinch": "^3.4.1",
- "socket.io-client": "^4.7.4"
+ "socket.io-client": "^4.7.4",
+ "use-sound": "^4.0.3"
},
"devDependencies": {
"@tsconfig/vite-react": "^3.0.0",
diff --git a/packages/client/src/components/Header/HeaderLeft.tsx b/packages/client/src/components/Header/HeaderLeft.tsx
index 231e3f5c2fb92bdb5e4082d02c6c7aa7aae5c49e..df31df14fdbf784009715e55bc9a0cebe1eb4848 100644
--- a/packages/client/src/components/Header/HeaderLeft.tsx
+++ b/packages/client/src/components/Header/HeaderLeft.tsx
@@ -4,15 +4,27 @@ import { AccountStanding } from "./AccountStanding";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { Debug } from "@sc07-canvas/lib/src/debug";
import { faInfoCircle, faTools } from "@fortawesome/free-solid-svg-icons";
-
+import African3 from '../../sounds/African3.mp3'
+import useSound from "use-sound";
+
export const HeaderLeft = () => {
- const { setInfoSidebar } = useAppContext();
+ const { setInfoSidebar, uiClickSound } = useAppContext();
+
+ const [African3Sound] = useSound(
+ African3,
+ { volume: 0.5 }
+ );
return (
{import.meta.env.DEV && (