diff --git a/src/store/features/modal/modalSlice.ts b/src/store/features/modal/modalSlice.ts index 70c6846d..8b1f19d6 100644 --- a/src/store/features/modal/modalSlice.ts +++ b/src/store/features/modal/modalSlice.ts @@ -2,19 +2,13 @@ import { PayloadAction, createSlice } from "@reduxjs/toolkit"; export type ModalType = "example1" | "example2"; -interface ModalData { - data?: {}; -} - interface ModalState { type: ModalType | null; - data: ModalData; isOpen: boolean; } const initialState: ModalState = { type: null, - data: {}, isOpen: false, }; @@ -22,10 +16,9 @@ export const modalSlice = createSlice({ name: "modal", initialState, reducers: { - onOpen: (state, action: PayloadAction<{ type: ModalType; data?: any }>) => { + onOpen: (state, action: PayloadAction<{ type: ModalType }>) => { state.isOpen = true; state.type = action.payload.type; - state.data = action.payload.data || null; }, onClose: (state) => { state.isOpen = false;