Refactor 'me' reducer

merge-requests/1/head
Alex Gleason 2020-04-17 16:10:55 -05:00
rodzic 5781d0de07
commit c40fb925e9
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 7211D1F99744FBB7
1 zmienionych plików z 1 dodań i 2 usunięć

Wyświetl plik

@ -1,13 +1,12 @@
import { ME_FETCH_SUCCESS, ME_FETCH_FAIL, ME_FETCH_SKIP } from '../actions/me';
import { AUTH_LOGGED_OUT } from '../actions/auth';
import { fromJS } from 'immutable';
const initialState = null;
export default function me(state = initialState, action) {
switch(action.type) {
case ME_FETCH_SUCCESS:
return fromJS(action.me.id);
return action.me.id;
case ME_FETCH_FAIL:
return false;
case ME_FETCH_SKIP: