import React from 'react' import { useSelector, useDispatch } from 'react-redux' import { setStyle } from '../redux/reducers/styleSlice'; import { AiOutlineClose } from 'react-icons/ai'; const Stats = () => { const styleState = useSelector(state => state.style); const dispatch = useDispatch(); function close() { dispatch(setStyle({ ...styleState.style, displayStatsScreen: false, })) } return (
close()} style={{position: 'absolute', top: '20px', right: '20px'}}/>

Stats:

Total money won: ${styleState.style.statsScreenInfo.money.earned}

Total blackjack games won: {styleState.style.statsScreenInfo.blackjack.wins}

Total roulette games won: {styleState.style.statsScreenInfo.roulette.wins}

Total poker games won: {styleState.style.statsScreenInfo.poker.wins}

) } export default Stats