diff --git a/frontend/public/clickSoundEffect.wav b/frontend/public/clickSoundEffect.wav new file mode 100644 index 0000000..e123a09 Binary files /dev/null and b/frontend/public/clickSoundEffect.wav differ diff --git a/frontend/src/components/hallofame/Canvas.tsx b/frontend/src/components/hallofame/Canvas.tsx index e04df80..3095a2c 100644 --- a/frontend/src/components/hallofame/Canvas.tsx +++ b/frontend/src/components/hallofame/Canvas.tsx @@ -2,7 +2,6 @@ import React, { useEffect, useRef, useState } from "react"; import { getRandomInt } from "./utils/misc"; import gba from "/largeboy.png"; import { fetchPokemonData } from "./fetchPokemonData"; -import "../../App.css"; let scaleFactor = 1; let maxX = 0; let maxY = 0; @@ -519,7 +518,10 @@ const Canvas: React.FC = () => { pokemonData[pokeIndex].PokiHeight * scaleFactor * 1.5, ); } - function playClickAudio() {} + function playClickAudio() { + const sound = new Audio('\clickSoundEffect.wav') + sound.play(); + } return (