aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/obrigado/page.tsx9
-rw-r--r--app/votar/page.tsx2
2 files changed, 1 insertions, 10 deletions
diff --git a/app/obrigado/page.tsx b/app/obrigado/page.tsx
index c5d3bc5..7234012 100644
--- a/app/obrigado/page.tsx
+++ b/app/obrigado/page.tsx
@@ -27,19 +27,12 @@ export default function ObrigadoPage() {
const hasRun = useRef(false);
- const [audioElement, setAudioElement] = useState<HTMLAudioElement>()
-
useEffect(() => {
if (!rm || !name || !cpf || !option) {
window.location.href = "/";
return;
}
- if (!audioElement) {
- const audio = new Audio('/confirma.mp3')
- setAudioElement(audio)
- }
-
const saveVote = async () => {
try {
const supabase = getSupabaseClient();
@@ -70,8 +63,6 @@ export default function ObrigadoPage() {
}
setSaveStatus("success");
- if (!audioElement) return;
- audioElement.play();
} catch (error) {
console.error("Erro ao salvar voto:", error);
setSaveStatus("error");
diff --git a/app/votar/page.tsx b/app/votar/page.tsx
index 79b6c28..5ca0cb4 100644
--- a/app/votar/page.tsx
+++ b/app/votar/page.tsx
@@ -26,7 +26,7 @@ export default function VotarPage() {
return;
}
- const audio = new Audio('/aperta.mp3')
+ const audio = new Audio('/confirma.mp3')
setAudioElement(audio)
}, [rm, nome, cpf, router]);