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 df1a6a7..de396b9 100644 --- a/frontend/src/components/hallofame/Canvas.tsx +++ b/frontend/src/components/hallofame/Canvas.tsx @@ -2,6 +2,7 @@ import React, { useEffect, useRef, useState } from "react"; import { getRandomInt } from "./utils/misc"; import gba from "/largeboy.png"; import { fetchPokemonData } from "./fetchPokemonData"; + let scaleFactor = 1; let maxX = 0; let maxY = 0; @@ -461,7 +462,10 @@ const Canvas: React.FC = () => { pokemonData[pokeIndex].PokiHeight * scaleFactor * 1.5, ); } - function playClickAudio() {} + function playClickAudio() { + const sound = new Audio('\clickSoundEffect.wav') + sound.play(); + } return (
{/* Canvas for video */}