Commit c3331a50 authored by Chunchi Che's avatar Chunchi Che

update router

parent c0f31e4d
Pipeline #23061 canceled with stages
in 9 minutes and 29 seconds
...@@ -25,7 +25,7 @@ export const Alert = () => { ...@@ -25,7 +25,7 @@ export const Alert = () => {
afterClose={() => { afterClose={() => {
// 发送投降信号 // 发送投降信号
sendSurrender(); sendSurrender();
navigate("/"); navigate("/match");
}} }}
/> />
) : ( ) : (
......
...@@ -57,6 +57,8 @@ export const ReplayModal: React.FC = () => { ...@@ -57,6 +57,8 @@ export const ReplayModal: React.FC = () => {
useEffect(() => { useEffect(() => {
if (hasStart) { if (hasStart) {
setLoading(false); setLoading(false);
localStore.open = false;
localStore.hasStart = false;
// 跳转 // 跳转
navigate(`/duel`); navigate(`/duel`);
} }
......
...@@ -27,7 +27,7 @@ export const Component: React.FC = () => { ...@@ -27,7 +27,7 @@ export const Component: React.FC = () => {
const navigate = useNavigate(); const navigate = useNavigate();
useEffect(() => { useEffect(() => {
// 人机对战跳转; // 人机对战跳转
if (joined) { if (joined) {
navigate(`/waitroom`); navigate(`/waitroom`);
} }
......
...@@ -297,7 +297,7 @@ const SideButtons: React.FC<{ ...@@ -297,7 +297,7 @@ const SideButtons: React.FC<{
// 重置stores // 重置stores
resetUniverse(); resetUniverse();
// 返回上一个路由 // 返回上一个路由
navigate(".."); navigate("/match");
}} }}
/> />
<Button <Button
......
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