Auto eslint fix

This commit is contained in:
James Barnsley
2019-09-05 15:36:11 +12:00
parent 4513a0d109
commit e4d53a2d35
126 changed files with 23283 additions and 23573 deletions

View File

@ -1,38 +1,34 @@
import * as helpers from '../../helpers';
export default function reducer(google = {}, action){
switch (action.type){
export default function reducer(google = {}, action) {
switch (action.type) {
case 'GOOGLE_SET':
return { ...google, ...action.data };
case 'GOOGLE_SET':
return Object.assign({}, google, action.data);
case 'GOOGLE_LIBRARY_ARTISTS_LOADED':
if (google.library_artists) {
var uris = [...google.library_artists, ...action.uris];
} else {
var { uris } = action;
}
return { ...google, library_artists: helpers.removeDuplicates(uris) };
case 'GOOGLE_LIBRARY_ARTISTS_LOADED':
if (google.library_artists){
var uris = [...google.library_artists,...action.uris];
} else {
var uris = action.uris;
}
return Object.assign({}, google, { library_artists: helpers.removeDuplicates(uris) });
case 'GOOGLE_CLEAR_LIBRARY_ARTISTS':
return { ...google, library_artists: null };
case 'GOOGLE_CLEAR_LIBRARY_ARTISTS':
return Object.assign({}, google, { library_artists: null });
case 'GOOGLE_LIBRARY_ALBUMS_LOADED':
if (google.library_albums) {
var uris = [...google.library_albums, ...action.uris];
} else {
var { uris } = action;
}
return { ...google, library_albums: helpers.removeDuplicates(uris) };
case 'GOOGLE_LIBRARY_ALBUMS_LOADED':
if (google.library_albums){
var uris = [...google.library_albums,...action.uris];
} else {
var uris = action.uris;
}
return Object.assign({}, google, { library_albums: helpers.removeDuplicates(uris) });
case 'GOOGLE_CLEAR_LIBRARY_ALBUMS':
return { ...google, library_albums: null };
case 'GOOGLE_CLEAR_LIBRARY_ALBUMS':
return Object.assign({}, google, { library_albums: null });
default:
return google
}
default:
return google;
}
}