Changeset 189cd8f for components
- Timestamp:
- 07/06/22 00:11:47 (2 years ago)
- Branches:
- main
- Children:
- aac3b2b
- Parents:
- 3a783f2
- Location:
- components
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
components/Notification.jsx
r3a783f2 r189cd8f 2 2 3 3 import { AiOutlineClose } from 'react-icons/ai'; 4 5 import { useState } from 'react'; 4 6 5 7 import { useDispatch, useSelector } from 'react-redux'; … … 7 9 8 10 const Notification = () => { 11 const [timeoutIsSet, setTimeoutIsSet] = useState(false); 12 9 13 const styleState = useSelector(state => state.style); 10 14 … … 24 28 } 25 29 26 if (styleState.style.notification.show === true) { 30 if (styleState.style.notification.show === true && !timeoutIsSet) { 31 setTimeoutIsSet(true); 27 32 setTimeout(() => { 28 33 close(); 34 setTimeoutIsSet(false); 29 35 }, 3000); 30 36 } -
components/poker/PokerHeader.jsx
r3a783f2 r189cd8f 30 30 })); 31 31 32 let interval ;32 let interval = null; 33 33 34 34 axios.get(`/api/poker?action=get_player_info_on_enter&session_id=${localStorage.CAESSINO_SESSION_ID}`).then(res => { 35 35 if (res.data?.success) { 36 if (interval !== null) clearInterval(interval); 37 36 38 dispatch(setPlayer({ 37 39 ...playerState.player, … … 89 91 </h2> 90 92 </Link> 91 { playerState.pokerGame .player.table.length > 0 && <button style={{marginBottom: '4px', marginLeft: '32px', fontSize: '16px'}} className="tertiaryButton" onClick={() => leaveTable()}>Leave Table</button> }93 { playerState.pokerGame?.player?.table?.length > 0 && <button style={{marginBottom: '4px', marginLeft: '32px', fontSize: '16px'}} className="tertiaryButton" onClick={() => leaveTable()}>Leave Table</button> } 92 94 </div> 93 95 <nav> -
components/poker/PokerSections.jsx
r3a783f2 r189cd8f 15 15 const playerState = useSelector(state => state.player); 16 16 17 if (playerState.pokerGame .player.table.length > 0) {17 if (playerState.pokerGame?.player?.table?.length > 0) { 18 18 return ( 19 19 <>
Note:
See TracChangeset
for help on using the changeset viewer.