vanth/lib/store/session.js
Eli Ribble 867df0fc57 Add basic UI
This includes the login form, registration, and a simple nav bar when
you're logged in. I'm just sort of figuring all this stuff out
2016-05-17 16:38:20 -06:00

19 lines
399 B
JavaScript

import _ from 'lodash';
import * as Constants from 'vanth/constants';
const emptyState = {
name : null,
username : null,
uri : null,
};
var reducer = function(state = emptyState, action) {
switch (action.type) {
case Constants.ActionType.SESSION_GET_COMPLETE:
return _.assign({}, state, action.data);
default:
return state;
}
}
module.exports = reducer;