Commit a3edc4c6 authored by Chunchi Che's avatar Chunchi Che

fix small

parent 385774df
Pipeline #22697 passed with stages
in 11 minutes and 29 seconds
......@@ -34,7 +34,7 @@ export const resetUniverse = () => {
joinStore.reset();
matStore.reset();
moraStore.reset();
playerStore.reset();
placeStore.reset();
playerStore.reset();
replayStore.reset();
};
......@@ -98,7 +98,7 @@ const initialState: Omit<MatState, "reset"> = {
export const matStore: MatState = proxy<MatState>({
...initialState,
reset() {
Object.entries(initialState).forEach((key) => {
Object.keys(initialState).forEach((key) => {
// @ts-ignore
matStore[key] = initialState[key];
});
......
......@@ -17,7 +17,7 @@ const initialState = {
export const moraStore = proxy<MoraState>({
...initialState,
reset() {
Object.entries(initialState).forEach((key) => {
Object.keys(initialState).forEach((key) => {
// @ts-ignore
moraStore[key] = initialState[key];
});
......
......@@ -47,7 +47,7 @@ export const playerStore = proxy<PlayerState>({
return this.player0;
},
reset() {
Object.entries(initialState).forEach((key) => {
Object.keys(initialState).forEach((key) => {
// @ts-ignore
playerStore[key] = initialState[key];
});
......
......@@ -28,8 +28,8 @@ export const EndModal: React.FC = () => {
const navigate = useNavigate();
const onReturn = () => {
rs();
resetUniverse();
rs();
navigate("/");
};
......
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