Ignore:
Timestamp:
07/15/22 14:45:30 (23 months ago)
Author:
anastasovv <simon@…>
Branches:
main
Children:
55701f0
Parents:
1df3fde
Message:

Added complaints, managing credits, and lost connection screens

File:
1 edited

Legend:

Unmodified
Added
Removed
  • components/roulette/RouletteHeader.jsx

    r1df3fde r433e0c5  
    7979                                dispatch(setPlayer({
    8080                                    ...playerState.player,
     81                                    displayName: res.data?.displayName,
     82                                    session_id: res.data?.session_id,
    8183                                    credits: newRes.data?.rouletteGame?.player?.credits,
    8284                                }))
    8385                            }
    8486                        }
     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                        }))
    85111                    });
    86112                }, 1000);
     
    97123                    showCoin: false,
    98124                }));
    99 
    100                 dispatch(setStyle({
    101                     ...styleState.style,
    102                     displayLoadingScreen: false,
    103                 }))
    104125            }
    105126            else {
Note: See TracChangeset for help on using the changeset viewer.