Commit ba80b224 authored by Chunchi Che's avatar Chunchi Che

remove unused slice

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