Commit e3c3e4fd authored by Chunchi Che's avatar Chunchi Che

fix small

parent 6ecae01f
Pipeline #23650 passed with stages
in 13 minutes and 38 seconds
......@@ -40,9 +40,6 @@ export const Component: React.FC = () => {
const [watchLoading, setWatchLoading] = useState(false); // 观战模式的loading状态
const navigate = useNavigate();
// FIXME: 这里有bug,第一次选择房间的时候获取不到watchID
const { watchID } = useSnapshot(watchStore);
// 竞技匹配
const onCompetitiveMatch = () => message.error("暂未开放,敬请期待");
......@@ -76,7 +73,7 @@ export const Component: React.FC = () => {
width: "40vw",
okText: "进入观战",
onOk: async () => {
if (watchID) {
if (watchStore.watchID) {
setWatchLoading(true);
// 找到MC竞技匹配的Server
......@@ -84,7 +81,7 @@ export const Component: React.FC = () => {
(server) => server.name === "mycard-athletic",
);
if (mcServer) {
const passWd = getEncryptedPasswd(watchID, user);
const passWd = getEncryptedPasswd(watchStore.watchID, user);
await connectSrvpro({
ip: mcServer.ip + ":" + mcServer.port,
player: user.username,
......
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