Splitting out helpers into separate files

This commit is contained in:
James Barnsley
2020-03-03 16:39:37 +13:00
parent 57dd18e870
commit 5a1f08fdf0
105 changed files with 5456 additions and 5574 deletions

View File

@ -1,13 +1,13 @@
const helpers = require('./../../helpers');
import { formatUser } from '../../util/format';
const coreActions = require('../core/actions');
const lastfmActions = require('./actions');
const LastfmMiddleware = (function () {
const LastfmMiddleware = (function () {
return (store) => (next) => (action) => {
switch (action.type) {
switch (action.type) {
case 'LASTFM_ME_LOADED':
var me = helpers.formatUser(action.me);
var me = formatUser(action.me);
Object.assign(
me,
{
@ -34,4 +34,4 @@ const LastfmMiddleware = (function () {
};
}());
export default LastfmMiddleware;
export default LastfmMiddleware;