fix: linter warnings
This commit is contained in:
parent
7b12bd6cce
commit
331be96310
2 changed files with 9 additions and 9 deletions
|
@ -1,5 +1,5 @@
|
|||
import {combineReducers} from 'redux'
|
||||
import { combineReducers } from 'redux';
|
||||
|
||||
import login from './login'
|
||||
import login from './login';
|
||||
|
||||
export default combineReducers({login})
|
||||
export default combineReducers({ login });
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
const initialState = null
|
||||
const initialState = null;
|
||||
|
||||
export function login(user) {
|
||||
return {type: 'LOGIN.LOGIN', payload: {user}}
|
||||
return { type: 'LOGIN.LOGIN', payload: { user } };
|
||||
}
|
||||
|
||||
export function logout() {
|
||||
return {type: 'LOGIN.LOGOUT'}
|
||||
return { type: 'LOGIN.LOGOUT' };
|
||||
}
|
||||
|
||||
export default function loginReducer(state = initialState, action) {
|
||||
switch (action.type) {
|
||||
case 'LOGIN.LOGIN':
|
||||
return action.payload.user
|
||||
return action.payload.user;
|
||||
case 'LOGIN.LOGOUT':
|
||||
return null
|
||||
return null;
|
||||
default:
|
||||
return state
|
||||
return state;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue