mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 21:06:42 +07:00
clearing errors in dialog on input
This commit is contained in:
parent
f1463ed5ea
commit
88ee0601c8
6 changed files with 58 additions and 15 deletions
24
src/redux/modal/index.ts
Normal file
24
src/redux/modal/index.ts
Normal file
|
@ -0,0 +1,24 @@
|
|||
import { MODAL_HANDLERS } from '~/redux/modal/handlers';
|
||||
import { createReducer } from '~/utils/reducer';
|
||||
import { DIALOGS } from '~/redux/modal/constants';
|
||||
import { ValueOf, IFile } from '~/redux/types';
|
||||
|
||||
export interface IModalState {
|
||||
is_shown: boolean;
|
||||
dialog: ValueOf<typeof DIALOGS>;
|
||||
photoswipe: {
|
||||
images: IFile[];
|
||||
index: number;
|
||||
};
|
||||
}
|
||||
|
||||
const INITIAL_STATE: IModalState = {
|
||||
is_shown: true,
|
||||
dialog: DIALOGS.LOGIN_SOCIAL_REGISTER,
|
||||
photoswipe: {
|
||||
images: [],
|
||||
index: 0,
|
||||
},
|
||||
};
|
||||
|
||||
export default createReducer(INITIAL_STATE, MODAL_HANDLERS);
|
Loading…
Add table
Add a link
Reference in a new issue