Commit 6616280f authored by Chunchi Che's avatar Chunchi Che

fix alert

parent bc5a3760
......@@ -149,10 +149,8 @@ export default class GameMsgAdapter implements StocAdapter {
break;
}
default: {
gameMsg.unimplemented = new ygopro.StocGameMessage({
unimplemented: new ygopro.StocGameMessage.MsgUnimplemented({
command: func,
}),
gameMsg.unimplemented = new ygopro.StocGameMessage.MsgUnimplemented({
command: func,
});
break;
......
import { Alert } from "antd";
import React from "react";
import { useNavigate } from "react-router-dom";
import { sendSurrender } from "../../api/ocgcore/ocgHelper";
import { useAppSelector } from "../../hook";
import { selectUnimplemented } from "../../reducers/duel/mod";
import { Alert } from "antd";
const NeosAlert = () => {
const unimplemented = useAppSelector(selectUnimplemented);
......@@ -17,7 +18,10 @@ const NeosAlert = () => {
showIcon
type="error"
closable
banner
afterClose={() => {
// 发送投降信号
sendSurrender();
navigate("/");
}}
/>
......
......@@ -31,6 +31,7 @@ import Alert from "./alert";
const NeosDuel = () => {
return (
<>
<Alert />
<NeosLayout
sider={<NeosSider />}
header={<PlayerStatus />}
......@@ -45,7 +46,6 @@ const NeosDuel = () => {
<PositionModal />
<OptionModal />
<CheckCardModalV2 />
<Alert />
</>
);
};
......
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