Changeset 433e0c5 for components/roulette
- Timestamp:
- 07/15/22 14:45:30 (2 years ago)
- Branches:
- main
- Children:
- 55701f0
- Parents:
- 1df3fde
- Location:
- components/roulette
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
components/roulette/BetModal.jsx
r1df3fde r433e0c5 8 8 9 9 import axios from 'axios'; 10 import { setPlayer, setRouletteGame } from '../../redux/reducers/playerSlice';11 10 12 11 const BetModal = () => { -
components/roulette/Roulette.jsx
r1df3fde r433e0c5 8 8 import Notification from '../Notification' 9 9 import Sections from './Sections' 10 import LostConnection from '../LostConnection' 10 11 11 12 const Roulette = () => { … … 25 26 26 27 <Notification/> 28 29 <LostConnection/> 27 30 </div> 28 31 ) -
components/roulette/RouletteHeader.jsx
r1df3fde r433e0c5 79 79 dispatch(setPlayer({ 80 80 ...playerState.player, 81 displayName: res.data?.displayName, 82 session_id: res.data?.session_id, 81 83 credits: newRes.data?.rouletteGame?.player?.credits, 82 84 })) 83 85 } 84 86 } 87 88 if (newRes.data?.extraAction && newRes.data?.extraAction !== "spin_wheel") { 89 dispatch(setStyle({ 90 ...styleState.style, 91 displayLoadingScreen: false, 92 notification: { 93 ...styleState.style.notification, 94 show: false, 95 }, 96 lostConnectionInfo: { 97 show: false, 98 message: '' 99 } 100 })) 101 } 102 }).catch(error => { 103 dispatch(setStyle({ 104 ...styleState.style, 105 displayLoadingScreen: false, 106 lostConnectionInfo: { 107 show: true, 108 message: 'Game will resume upon reconnection to the server.' 109 } 110 })) 85 111 }); 86 112 }, 1000); … … 97 123 showCoin: false, 98 124 })); 99 100 dispatch(setStyle({101 ...styleState.style,102 displayLoadingScreen: false,103 }))104 125 } 105 126 else { -
components/roulette/Timer.jsx
r1df3fde r433e0c5 1 1 import React from 'react' 2 2 3 import { useEffect } from 'react'; 4 import { useDispatch, useSelector } from 'react-redux' 5 import { setPlayer, setRouletteGame } from '../../redux/reducers/playerSlice'; 6 7 import axios from 'axios'; 8 import { setRoulette, setStyle } from '../../redux/reducers/styleSlice'; 3 import { useSelector } from 'react-redux' 9 4 10 5 const Timer = () => { 11 const dispatch = useDispatch();12 13 6 const playerState = useSelector(state => state.player); 14 const styleState = useSelector(state => state.style);15 7 16 8 function getTimer() {
Note:
See TracChangeset
for help on using the changeset viewer.