Commit ba80b224 authored by Chunchi Che's avatar Chunchi Che

remove unused slice

parent c34e2a38
......@@ -59,7 +59,6 @@ import {
setCheckCardModalV3OverFlowImpl,
setCheckCardModalV3ResponseAbleImpl,
resetCheckCardModalV3Impl,
setCheckCardModalV3SelectedImpl,
checkCardModalV3Case,
setCardModalCountersImpl,
} from "./modal/mod";
......@@ -184,7 +183,6 @@ const initialState: DuelState = {
allLevel: 0,
mustSelectList: [],
selectAbleList: [],
selectedList: [],
},
},
};
......@@ -279,7 +277,6 @@ const duelSlice = createSlice({
setCheckCardModalV3OverFlow: setCheckCardModalV3OverFlowImpl,
setCheckCardModalV3ResponseAble: setCheckCardModalV3ResponseAbleImpl,
resetCheckCardModalV3: resetCheckCardModalV3Impl,
setCheckCardModalV3Selected: setCheckCardModalV3SelectedImpl,
setCardModalCounters: setCardModalCountersImpl,
// 通用的`Reducer`
......@@ -393,7 +390,6 @@ export const {
setCheckCardModalV3OverFlow,
setCheckCardModalV3ResponseAble,
resetCheckCardModalV3,
setCheckCardModalV3Selected,
setCardModalCounters,
} = duelSlice.actions;
export const selectDuelHsStart = (state: RootState) => {
......
......@@ -5,7 +5,7 @@ import {
CaseReducer,
createAsyncThunk,
} from "@reduxjs/toolkit";
import { CardMeta, fetchCard } from "../../../api/cards";
import { fetchCard } from "../../../api/cards";
import { RootState } from "../../../store";
import { ygopro } from "../../../api/ocgcore/idl/ocgcore";
import { findCardByLocation } from "../util";
......@@ -48,17 +48,6 @@ export const setCheckCardModalV3ResponseAbleImpl: DuelReducer<boolean> = (
state.modalState.checkCardModalV3.responseable = action.payload;
};
export const setCheckCardModalV3SelectedImpl: DuelReducer<
{
meta: CardMeta;
level1: number;
level2: number;
response: number;
}[]
> = (state, action) => {
state.modalState.checkCardModalV3.selectedList = action.payload;
};
// 增加卡牌选项
export const fetchCheckCardMetasV3 = createAsyncThunk(
"duel/fetchCheckCardMetaV3",
......@@ -137,7 +126,6 @@ export const resetCheckCardModalV3Impl: CaseReducer<DuelState> = (state) => {
modalState.responseable = undefined;
modalState.mustSelectList = [];
modalState.selectAbleList = [];
modalState.selectedList = [];
};
export const selectCheckCardModalV3 = (state: RootState) =>
......
......@@ -92,13 +92,6 @@ export interface ModalState {
level2: number;
response: number;
}[];
// TODO: remove this prop
selectedList: {
meta: CardMeta;
level1: number;
level2: number;
response: number;
}[];
};
}
......
......@@ -21,7 +21,7 @@ const CheckCardModalV3 = () => {
const max = state.selectMax || 0;
const mustSelectOptions = state.mustSelectList;
const selectAbleOptions = state.selectAbleList;
const [selectedOptions, setSelectedOptions] = useState(state.selectedList);
const [selectedOptions, setSelectedOptions] = useState([]);
const overflow = state.overflow;
const LevelSum = state.allLevel;
const Level1Sum = mustSelectOptions
......
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