refactor: Rewrite immutablejs import statements using destructuring (#4147)
This commit is contained in:
parent
7bacdd718a
commit
cc68d1945b
28 changed files with 141 additions and 141 deletions
|
@ -1,39 +1,39 @@
|
|||
import { SETTING_CHANGE } from '../actions/settings';
|
||||
import { COLUMN_ADD, COLUMN_REMOVE, COLUMN_MOVE } from '../actions/columns';
|
||||
import { STORE_HYDRATE } from '../actions/store';
|
||||
import Immutable from 'immutable';
|
||||
import { Map as ImmutableMap, fromJS } from 'immutable';
|
||||
import uuid from '../uuid';
|
||||
|
||||
const initialState = Immutable.Map({
|
||||
const initialState = ImmutableMap({
|
||||
onboarded: false,
|
||||
|
||||
home: Immutable.Map({
|
||||
shows: Immutable.Map({
|
||||
home: ImmutableMap({
|
||||
shows: ImmutableMap({
|
||||
reblog: true,
|
||||
reply: true,
|
||||
}),
|
||||
|
||||
regex: Immutable.Map({
|
||||
regex: ImmutableMap({
|
||||
body: '',
|
||||
}),
|
||||
}),
|
||||
|
||||
notifications: Immutable.Map({
|
||||
alerts: Immutable.Map({
|
||||
notifications: ImmutableMap({
|
||||
alerts: ImmutableMap({
|
||||
follow: true,
|
||||
favourite: true,
|
||||
reblog: true,
|
||||
mention: true,
|
||||
}),
|
||||
|
||||
shows: Immutable.Map({
|
||||
shows: ImmutableMap({
|
||||
follow: true,
|
||||
favourite: true,
|
||||
reblog: true,
|
||||
mention: true,
|
||||
}),
|
||||
|
||||
sounds: Immutable.Map({
|
||||
sounds: ImmutableMap({
|
||||
follow: true,
|
||||
favourite: true,
|
||||
reblog: true,
|
||||
|
@ -41,20 +41,20 @@ const initialState = Immutable.Map({
|
|||
}),
|
||||
}),
|
||||
|
||||
community: Immutable.Map({
|
||||
regex: Immutable.Map({
|
||||
community: ImmutableMap({
|
||||
regex: ImmutableMap({
|
||||
body: '',
|
||||
}),
|
||||
}),
|
||||
|
||||
public: Immutable.Map({
|
||||
regex: Immutable.Map({
|
||||
public: ImmutableMap({
|
||||
regex: ImmutableMap({
|
||||
body: '',
|
||||
}),
|
||||
}),
|
||||
});
|
||||
|
||||
const defaultColumns = Immutable.fromJS([
|
||||
const defaultColumns = fromJS([
|
||||
{ id: 'COMPOSE', uuid: uuid(), params: {} },
|
||||
{ id: 'HOME', uuid: uuid(), params: {} },
|
||||
{ id: 'NOTIFICATIONS', uuid: uuid(), params: {} },
|
||||
|
@ -82,7 +82,7 @@ export default function settings(state = initialState, action) {
|
|||
case SETTING_CHANGE:
|
||||
return state.setIn(action.key, action.value);
|
||||
case COLUMN_ADD:
|
||||
return state.update('columns', list => list.push(Immutable.fromJS({ id: action.id, uuid: uuid(), params: action.params })));
|
||||
return state.update('columns', list => list.push(fromJS({ id: action.id, uuid: uuid(), params: action.params })));
|
||||
case COLUMN_REMOVE:
|
||||
return state.update('columns', list => list.filterNot(item => item.get('uuid') === action.uuid));
|
||||
case COLUMN_MOVE:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue