Skip to content

Commit

Permalink
fix: cards in settle modal show innoraml state
Browse files Browse the repository at this point in the history
  • Loading branch information
bbb169 committed Oct 15, 2023
1 parent c73f5d3 commit 4a2702e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
14 changes: 11 additions & 3 deletions src/pages/playRoom/component/settleMoal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,17 @@ export function SettleMoal () {
{
victoryPlayers?.map(([player, victoryInfo]) => <div key={player.name}>
<Popconfirm title={
victoryInfo.cards
? <DemoCards cards={victoryInfo.cards}/>
: <div>当前情况不能查看胜者牌型</div>
<div css={css`
width: 80vw;
display: flex;
justify-content: center;
`}>
{
victoryInfo.cards
? <DemoCards cards={victoryInfo.cards}/>
: <div>当前情况不能查看胜者牌型</div>
}
</div>
} placement='bottom' trigger={'click'} showCancel={false}
icon={<></>}>
<Button type="primary" shape="round">{player.name}: 收获筹码: {victoryInfo.getChips} {victoryInfo.cardName ? `,牌型: ${cardTypeTranslateMap[victoryInfo.cardName]}` : ''}</Button>
Expand Down
6 changes: 2 additions & 4 deletions src/pages/playRoom/hooks/usePlayers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,10 @@ export default function usePlayersCards (): [PlayerInfoType[], PlayerInfoType |
});

// =================== Heartbeat Detection ====================
socket.on('heartbeat', (data, callback) => {
socket.on('heartbeat', (callback) => {
console.log('============ heartbeat ==================');

setTimeout(() => {
callback();
}, 5000);
callback();
});

return () => {
Expand Down

0 comments on commit 4a2702e

Please sign in to comment.