mirror of
https://github.com/IT4Change/ohmyform-ui.git
synced 2025-12-13 09:45:50 +00:00
23 lines
538 B
TypeScript
23 lines
538 B
TypeScript
import redux, {Reducer} from 'redux'
|
|
|
|
export interface AuthState {
|
|
authenticated?: boolean
|
|
|
|
}
|
|
|
|
type ActionTypes = 'AUTH_INIT' | 'AUTH_LOGOUT' | 'AUTH_UPDATE_SETTINGS';
|
|
type Action = redux.Action<ActionTypes> & redux.AnyAction
|
|
|
|
export const actionTypes: {[key: string]: ActionTypes} = {
|
|
INIT: 'AUTH_INIT',
|
|
LOGOUT: 'AUTH_LOGOUT',
|
|
UPDATE_SETTINGS: 'AUTH_UPDATE_SETTINGS',
|
|
};
|
|
|
|
const initialState: AuthState = {
|
|
}
|
|
|
|
export const auth: Reducer<AuthState, Action> = (state = initialState, action: Action): AuthState => {
|
|
return state
|
|
}
|