summaryrefslogtreecommitdiff
path: root/opendc-web/opendc-web-ui/src/redux/reducers/auth.js
blob: 399a4b10700bc42efe1c49527f9973bbefe65a5b (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
    }
}