fix i cheto sdelal

This commit is contained in:
aurinex
2025-12-13 20:14:24 +05:00
parent d9a3a1cd1f
commit abb45c3838
7 changed files with 513 additions and 7 deletions

View File

@ -26,7 +26,7 @@ import { getPlayerServer } from '../utils/playerOnlineCheck';
import CaseRoulette from '../components/CaseRoulette';
import BonusShopItem from '../components/BonusShopItem';
import ShopItem from '../components/ShopItem';
import { playBuySound } from '../utils/sounds';
import { playBuySound, primeSounds } from '../utils/sounds';
function getRarityByWeight(
weight?: number,
@ -376,6 +376,7 @@ export default function Shop() {
setRouletteCaseItems(caseItems);
setRouletteReward(result.reward);
setRouletteOpen(true);
playBuySound();
// 4. уведомление
setNotification({
@ -405,6 +406,13 @@ export default function Shop() {
setRouletteOpen(false);
};
useEffect(() => {
const onFirstUserGesture = () => primeSounds();
window.addEventListener('pointerdown', onFirstUserGesture, { once: true });
return () => window.removeEventListener('pointerdown', onFirstUserGesture);
}, []);
return (
<Box
sx={{