refactor: Rewrite immutablejs import statements using destructuring (#4147)

This commit is contained in:
Sorin Davidoi
2017-07-11 01:00:14 +02:00
committed by Eugen Rochko
parent 7bacdd718a
commit cc68d1945b
28 changed files with 141 additions and 141 deletions

View File

@ -46,9 +46,9 @@ import {
FAVOURITED_STATUSES_EXPAND_SUCCESS,
} from '../actions/favourites';
import { STORE_HYDRATE } from '../actions/store';
import Immutable from 'immutable';
import { Map as ImmutableMap, fromJS } from 'immutable';
const normalizeAccount = (state, account) => state.set(account.id, Immutable.fromJS({
const normalizeAccount = (state, account) => state.set(account.id, fromJS({
followers_count: account.followers_count,
following_count: account.following_count,
statuses_count: account.statuses_count,
@ -80,12 +80,12 @@ const normalizeAccountsFromStatuses = (state, statuses) => {
return state;
};
const initialState = Immutable.Map();
const initialState = ImmutableMap();
export default function accountsCounters(state = initialState, action) {
switch(action.type) {
case STORE_HYDRATE:
return state.merge(action.state.get('accounts').map(item => Immutable.fromJS({
return state.merge(action.state.get('accounts').map(item => fromJS({
followers_count: item.get('followers_count'),
following_count: item.get('following_count'),
statuses_count: item.get('statuses_count'),