fix i cheto sdelal
This commit is contained in:
@ -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={{
|
||||
|
||||
Reference in New Issue
Block a user