Skip to content

Commit

Permalink
fix: fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
TiyoSheng committed Nov 27, 2023
1 parent 1a3c70c commit df43d43
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
9 changes: 5 additions & 4 deletions packages/client/src/components/Log/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,11 @@ const Log = () => {
}
setLogs([...logs]);
}
eventEmitter?.on('log', addLogCb);
return () => {
eventEmitter?.off('log', addLogCb);
};
try {
eventEmitter?.on('log', addLogCb);
} catch (error) {
console.log('eventEmitter.on error', error);
}
}, []);

return (
Expand Down
4 changes: 3 additions & 1 deletion packages/client/src/pages/game/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,9 @@ const Game = () => {
:
<PIXIAPP/>
}

{
curPlayer && percentage == 100 ? <Talk curPlayer={curPlayer} /> : null
}
<div className="discord">
<a href="https://discord.gg/UkarGN9Fjn" target="_blank"><img src={discordImg} /></a>
</div>
Expand Down

0 comments on commit df43d43

Please sign in to comment.