mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 12:56:41 +07:00
fixed grid layout
This commit is contained in:
parent
debb0640da
commit
6168841f78
8 changed files with 73 additions and 31 deletions
|
@ -2,8 +2,23 @@ import { createReducer } from 'reduxsauce';
|
|||
import * as ACTIONS from "$redux/user/actions";
|
||||
import { USER_ACTIONS } from "$redux/user/constants";
|
||||
|
||||
export interface IUserProfile {
|
||||
id: number,
|
||||
username: string,
|
||||
email: string,
|
||||
role: string,
|
||||
activated: boolean,
|
||||
}
|
||||
|
||||
export interface IUserFormStateLogin {
|
||||
error: string,
|
||||
}
|
||||
|
||||
export type IRootState = Readonly<{
|
||||
// key: string
|
||||
profile: IUserProfile,
|
||||
form_state: {
|
||||
login: IUserFormStateLogin,
|
||||
},
|
||||
}>;
|
||||
|
||||
type UnsafeReturnType<T> = T extends (...args: any[]) => infer R ? R : any;
|
||||
|
@ -20,9 +35,18 @@ const HANDLERS = {
|
|||
};
|
||||
|
||||
const INITIAL_STATE: IRootState = {
|
||||
// key: val,
|
||||
// key: val,
|
||||
// key: val
|
||||
profile: {
|
||||
id: 0,
|
||||
username: '',
|
||||
email: '',
|
||||
role: '',
|
||||
activated: false,
|
||||
},
|
||||
form_state: {
|
||||
login: {
|
||||
error: '',
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export default createReducer(INITIAL_STATE, HANDLERS);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue