Commit 2f04888f authored by Chunchi Che's avatar Chunchi Che

update morax page

parent 98b281d7
...@@ -28,9 +28,12 @@ export default function Mora() { ...@@ -28,9 +28,12 @@ export default function Mora() {
const player1 = useAppSelector(selectPlayer1); const player1 = useAppSelector(selectPlayer1);
const duelHsStart = useAppSelector(selectDuelHsStart); const duelHsStart = useAppSelector(selectDuelHsStart);
const navigate = useNavigate();
useEffect(() => { useEffect(() => {
// 若对局已经开始,自动跳转
if (duelHsStart) { if (duelHsStart) {
useNavigate()("/duel"); navigate("/duel");
} }
}, [duelHsStart]); }, [duelHsStart]);
......
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