From b38f0b50d143e2f21023faa43f0d42e6f0045e9f Mon Sep 17 00:00:00 2001 From: Jane Moroz Date: Sat, 23 Sep 2023 15:27:24 +0300 Subject: [PATCH] fix: remove data prop for now from modal slice --- src/store/features/modal/modalSlice.ts | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) 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;