Commit 80d2c890 authored by Chunchi Che's avatar Chunchi Che

fix menu component

parent c2dd78e6
...@@ -33,7 +33,6 @@ import styles from "./index.module.scss"; ...@@ -33,7 +33,6 @@ import styles from "./index.module.scss";
import PhaseType = ygopro.StocGameMessage.MsgNewPhase.PhaseType; import PhaseType = ygopro.StocGameMessage.MsgNewPhase.PhaseType;
import { openChatBox } from "../ChatBox"; import { openChatBox } from "../ChatBox";
const { phase: store } = matStore;
const { useToken } = theme; const { useToken } = theme;
const clearAllIdleInteractivities = () => { const clearAllIdleInteractivities = () => {
for (const card of cardStore.inner) { for (const card of cardStore.inner) {
...@@ -63,8 +62,11 @@ const initialPhaseBind: [ ...@@ -63,8 +62,11 @@ const initialPhaseBind: [
]; ];
export const Menu = () => { export const Menu = () => {
const { enableBp, enableM2, enableEp, currentPhase } = useSnapshot(store); const {
const { currentPlayer, chainSetting } = useSnapshot(matStore); currentPlayer,
chainSetting,
phase: { enableBp, enableM2, enableEp, currentPhase },
} = useSnapshot(matStore);
const [phaseBind, setPhaseBind] = useState(initialPhaseBind); const [phaseBind, setPhaseBind] = useState(initialPhaseBind);
const [phaseSwitchItems, setPhaseSwitchItems] = useState<MenuProps["items"]>( const [phaseSwitchItems, setPhaseSwitchItems] = useState<MenuProps["items"]>(
[], [],
......
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