Commit 7e2a4c3a authored by Chunchi Che's avatar Chunchi Che

Merge branch 'fix/sendUpdateDeck' into 'main'

修复娱乐匹配第一次准备无法成功的问题

See merge request !347
parents 0aaa67ec c718311e
Pipeline #25805 passed with stages
in 8 minutes and 55 seconds
...@@ -53,6 +53,12 @@ export const Component: React.FC = () => { ...@@ -53,6 +53,12 @@ export const Component: React.FC = () => {
const op = room.getOpPlayer(); const op = room.getOpPlayer();
const navigate = useNavigate(); const navigate = useNavigate();
useEffect(() => {
// 组件初始化时发一次更新卡组的包
//
// 否则娱乐匹配准备会有问题(原因不明)
if (deck) sendUpdateDeck(deck);
}, []);
useEffect(() => { useEffect(() => {
if (room.stage === RoomStage.DUEL_START) { if (room.stage === RoomStage.DUEL_START) {
// 决斗开始,跳转决斗页面 // 决斗开始,跳转决斗页面
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment