Suggestions: store as OrderedSet
This commit is contained in:
parent
c3ef55613d
commit
d296811851
|
@ -1,4 +1,4 @@
|
||||||
import { Map as ImmutableMap, List as ImmutableList, fromJS } from 'immutable';
|
import { Map as ImmutableMap, OrderedSet as ImmutableOrderedSet, fromJS } from 'immutable';
|
||||||
|
|
||||||
import { SUGGESTIONS_DISMISS } from 'soapbox/actions/suggestions';
|
import { SUGGESTIONS_DISMISS } from 'soapbox/actions/suggestions';
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ import reducer from '../suggestions';
|
||||||
describe('suggestions reducer', () => {
|
describe('suggestions reducer', () => {
|
||||||
it('should return the initial state', () => {
|
it('should return the initial state', () => {
|
||||||
expect(reducer(undefined, {})).toEqual(ImmutableMap({
|
expect(reducer(undefined, {})).toEqual(ImmutableMap({
|
||||||
items: ImmutableList(),
|
items: ImmutableOrderedSet(),
|
||||||
next: null,
|
next: null,
|
||||||
isLoading: false,
|
isLoading: false,
|
||||||
}));
|
}));
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { Map as ImmutableMap, List as ImmutableList, fromJS } from 'immutable';
|
import { Map as ImmutableMap, OrderedSet as ImmutableOrderedSet, fromJS } from 'immutable';
|
||||||
|
|
||||||
import { ACCOUNT_BLOCK_SUCCESS, ACCOUNT_MUTE_SUCCESS } from 'soapbox/actions/accounts';
|
import { ACCOUNT_BLOCK_SUCCESS, ACCOUNT_MUTE_SUCCESS } from 'soapbox/actions/accounts';
|
||||||
import { DOMAIN_BLOCK_SUCCESS } from 'soapbox/actions/domain_blocks';
|
import { DOMAIN_BLOCK_SUCCESS } from 'soapbox/actions/domain_blocks';
|
||||||
|
@ -14,7 +14,7 @@ import {
|
||||||
} from '../actions/suggestions';
|
} from '../actions/suggestions';
|
||||||
|
|
||||||
const initialState = ImmutableMap({
|
const initialState = ImmutableMap({
|
||||||
items: ImmutableList(),
|
items: ImmutableOrderedSet(),
|
||||||
next: null,
|
next: null,
|
||||||
isLoading: false,
|
isLoading: false,
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue