mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-26 21:36:40 +07:00
Modal
This commit is contained in:
parent
132fe872b6
commit
e5bc0d258f
17 changed files with 301 additions and 65 deletions
11
src/redux/modal/handlers.ts
Normal file
11
src/redux/modal/handlers.ts
Normal file
|
@ -0,0 +1,11 @@
|
|||
import { MODAL_ACTIONS } from '~/redux/modal/constants';
|
||||
|
||||
const setShown = (state, { is_shown }) => ({ ...state, is_shown });
|
||||
const showDialog = (state, { dialog }) => ({ ...state, dialog, is_shown: true });
|
||||
const setDialog = (state, { dialog }) => ({ ...state, dialog });
|
||||
|
||||
export const MODAL_HANDLERS = {
|
||||
[MODAL_ACTIONS.SET_SHOWN]: setShown,
|
||||
[MODAL_ACTIONS.SHOW_DIALOG]: showDialog,
|
||||
[MODAL_ACTIONS.SET_DIALOG]: setDialog,
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue