summaryrefslogtreecommitdiff
path: root/src/reducers/auth.js
blob: 635929d497d3fccf3a15bdf426f087d4db0f1549 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
import { LOG_IN_SUCCEEDED, LOG_OUT } from "../actions/auth";

export function auth(state = {}, action) {
  switch (action.type) {
    case LOG_IN_SUCCEEDED:
      return action.payload;
    case LOG_OUT:
      return {};
    default:
      return state;
  }
}