From 3b0901929586b69744eca6a2840f34674d049569 Mon Sep 17 00:00:00 2001 From: Andrew Roberts Date: Wed, 24 Sep 2025 14:34:01 -0400 Subject: [PATCH] restart audio on press --- components/Soundboard/index.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/components/Soundboard/index.tsx b/components/Soundboard/index.tsx index f2f63b1..1eab073 100644 --- a/components/Soundboard/index.tsx +++ b/components/Soundboard/index.tsx @@ -19,7 +19,14 @@ export default function Soundboard() { const getButton = (title: string, ref: RefObject) => { return + onClick={() => + { + if (ref.current){ + ref.current.currentTime = 0; + ref.current?.play() + } + } + }>{title} } return (