You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
import { createSlice, PayloadAction } from '@reduxjs/toolkit';
|
|
|
|
import { SessionConfirmDialogProps } from '../../components/session/SessionConfirm';
|
|
|
|
|
|
|
|
export type ConfirmModalState = SessionConfirmDialogProps | null;
|
|
|
|
|
|
|
|
const initialState: ConfirmModalState = null as ConfirmModalState;
|
|
|
|
|
|
|
|
const confirmModalSlice = createSlice({
|
|
|
|
name: 'confirmModal',
|
|
|
|
initialState,
|
|
|
|
reducers: {
|
|
|
|
updateConfirmModal(state, action: PayloadAction<ConfirmModalState | null>) {
|
|
|
|
state = action.payload;
|
|
|
|
return action.payload;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
export const { actions, reducer } = confirmModalSlice;
|
|
|
|
export const { updateConfirmModal } = actions;
|
|
|
|
export const confirmModalReducer = reducer;
|