UNPKG

react-simple-crud-ui

Version:

Written in React with hooks, simple CRUD UI with authentication.

31 lines (30 loc) 1.07 kB
import { AppStateModel } from "./Model"; export declare const AUTH_START = "START"; export interface AuthStartAction { type: typeof AUTH_START; } export declare const AUTH_END = "END"; export interface AuthEndAction { type: typeof AUTH_END; } export declare const AUTH_CHANGE = "CHANGE"; export interface AuthChangeAction { type: typeof AUTH_CHANGE; payload: any; } export declare const AUTH_LOGIN_ERROR = "LOGIN_ERROR"; export interface AuthLoginErrorAction { type: typeof AUTH_LOGIN_ERROR; payload: string; } export declare const AUTH_LOGIN_SUCCESS = "LOGIN_SUCCESS"; export interface AuthLoginSuccessAction { type: typeof AUTH_LOGIN_SUCCESS; payload: any; } export declare const AUTH_LOGOUT = "LOGOUT"; export interface AuthLogoutAction { type: typeof AUTH_LOGOUT; } export declare type AppActions = AuthStartAction | AuthEndAction | AuthChangeAction | AuthLoginErrorAction | AuthLoginSuccessAction | AuthLogoutAction; export declare const appReducer: (state: AppStateModel, action: AppActions) => any;