From 0a3ffa63140bcecb7f696175c816ce3342f186eb Mon Sep 17 00:00:00 2001 From: "soroush.asadi" Date: Thu, 4 Jun 2026 12:46:51 +0330 Subject: [PATCH] Fix: in-game mute button now mutes background music too HUD mute is a master toggle (sound effects + music) via sound-store.toggleAll; icon reflects fully-muted state. Co-Authored-By: Claude Opus 4.8 --- src/components/GameTable.tsx | 14 ++++++++------ src/lib/sound-store.ts | 9 +++++++++ 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/src/components/GameTable.tsx b/src/components/GameTable.tsx index 2546a4f..6f5ab37 100644 --- a/src/components/GameTable.tsx +++ b/src/components/GameTable.tsx @@ -53,7 +53,9 @@ export function GameTable({ onExit }: { onExit?: () => void } = {}) { const { t } = useI18n(); const sfx = useSoundStore((s) => s.sfx); - const toggleSfx = useSoundStore((s) => s.toggleSfx); + const music = useSoundStore((s) => s.music); + const toggleAll = useSoundStore((s) => s.toggleAll); + const muted = !sfx && !music; const exit = onExit ?? reset; const { phase, players, hakem, trump, turn, currentTrick } = game; @@ -72,14 +74,14 @@ export function GameTable({ onExit }: { onExit?: () => void } = {}) {
{trump && }