27 lines
700 B
TypeScript
27 lines
700 B
TypeScript
![]() |
import * as Actions from "../actions";
|
||
|
|
||
|
const initialState = {
|
||
|
// Show the drawer?
|
||
|
drawer: false,
|
||
|
// Should we show the button to open the drawer?
|
||
|
drawerButton: true,
|
||
|
// Is the user authenticated?
|
||
|
// TODO: Set this to false
|
||
|
authenticated: true,
|
||
|
};
|
||
|
|
||
|
export function LateinicusApp(state = initialState, action: any) {
|
||
|
switch (action.type) {
|
||
|
case Actions.SET_DRAWER:
|
||
|
return Object.assign({}, state, {
|
||
|
drawer: action.show,
|
||
|
});
|
||
|
case Actions.SET_DRAWER_BUTTON:
|
||
|
return Object.assign({}, state, {
|
||
|
drawerButton: action.show,
|
||
|
});
|
||
|
default:
|
||
|
return state;
|
||
|
}
|
||
|
};
|