fix: linter warnings

This commit is contained in:
Tobias Mahnke 2021-04-20 17:41:27 +02:00
parent 7b12bd6cce
commit 331be96310
2 changed files with 9 additions and 9 deletions

View file

@ -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 });

View file

@ -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;
}
}