Splitting out helpers into separate files
This commit is contained in:
@ -1,8 +1,8 @@
|
||||
|
||||
import * as helpers from '../../helpers';
|
||||
import { removeDuplicates } from '../../util/arrays';
|
||||
|
||||
export default function reducer(google = {}, action) {
|
||||
switch (action.type) {
|
||||
switch (action.type) {
|
||||
case 'GOOGLE_SET':
|
||||
return { ...google, ...action.data };
|
||||
|
||||
@ -12,7 +12,7 @@ export default function reducer(google = {}, action) {
|
||||
} else {
|
||||
var { uris } = action;
|
||||
}
|
||||
return { ...google, library_artists: helpers.removeDuplicates(uris) };
|
||||
return { ...google, library_artists: removeDuplicates(uris) };
|
||||
|
||||
case 'GOOGLE_CLEAR_LIBRARY_ARTISTS':
|
||||
return { ...google, library_artists: null };
|
||||
@ -23,7 +23,7 @@ export default function reducer(google = {}, action) {
|
||||
} else {
|
||||
var { uris } = action;
|
||||
}
|
||||
return { ...google, library_albums: helpers.removeDuplicates(uris) };
|
||||
return { ...google, library_albums: removeDuplicates(uris) };
|
||||
|
||||
case 'GOOGLE_CLEAR_LIBRARY_ALBUMS':
|
||||
return { ...google, library_albums: null };
|
||||
|
||||
Reference in New Issue
Block a user