Changeset faff334 for components/Stats.jsx
- Timestamp:
- 07/18/22 13:59:55 (2 years ago)
- Branches:
- main
- Children:
- 22367db
- Parents:
- e903234
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
components/Stats.jsx
re903234 rfaff334 5 5 6 6 import { AiOutlineClose } from 'react-icons/ai'; 7 8 import axios from 'axios'; 7 9 8 10 const Stats = () => { … … 18 20 } 19 21 22 function openHistory() { 23 axios.get(`/api/postgre?action=get_games_history&session_id=${localStorage.CAESSINO_SESSION_ID}`).then(res => { 24 if (res.data?.success) { 25 dispatch(setStyle({ 26 ...styleState.style, 27 gamesHistory: { 28 blackjack: { 29 rooms: res.data?.blackjack, 30 }, 31 roulette: { 32 games: res.data?.roulette, 33 }, 34 poker: { 35 tables: res.data?.poker, 36 }, 37 }, 38 displayGamesHistoryScreen: true, 39 })) 40 } 41 }) 42 } 43 20 44 return ( 21 45 <div className="fullscreen fs-centered statsScreen" style={{display: styleState.style.displayStatsScreen ? 'block' : 'none'}}> … … 27 51 <p>Total roulette games won: <span>{styleState.style.statsScreenInfo.roulette.wins}</span></p> 28 52 <p>Total poker games won: <span>{styleState.style.statsScreenInfo.poker.wins}</span></p> 53 54 <button onClick={() => openHistory()} className="primaryButton" style={{marginTop: '5rem', marginLeft: '1rem'}}>See Games History</button> 29 55 </div> 30 56 </div>
Note:
See TracChangeset
for help on using the changeset viewer.