- Cleanup

This commit is contained in:
2019-08-06 01:36:08 -04:00
parent 6e71ac688a
commit b8ddc54b99
43 changed files with 361 additions and 170 deletions

14
app/reducers/auth.js Normal file
View File

@@ -0,0 +1,14 @@
import { LOGIN_SUCCESS, SET_AUTH, UNSET_AUTH } from '../constants/actionTypes.js';
export const auth = (state = null, action) => {
switch (action.type) {
case LOGIN_SUCCESS:
return action.payload.token;
case SET_AUTH:
return action.payload;
case UNSET_AUTH:
return null;
default:
return state;
}
};