Merge branch 'suggestions-set' into 'develop'

Suggestions: store as OrderedSet

See merge request soapbox-pub/soapbox-fe!1432
This commit is contained in:
Alex Gleason 2022-05-20 01:35:27 +00:00
commit 0a1457c26b
2 changed files with 4 additions and 4 deletions

View File

@ -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';
@ -7,7 +7,7 @@ import reducer from '../suggestions';
describe('suggestions reducer', () => {
it('should return the initial state', () => {
expect(reducer(undefined, {})).toEqual(ImmutableMap({
items: ImmutableList(),
items: ImmutableOrderedSet(),
next: null,
isLoading: false,
}));

View File

@ -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 { DOMAIN_BLOCK_SUCCESS } from 'soapbox/actions/domain_blocks';
@ -14,7 +14,7 @@ import {
} from '../actions/suggestions';
const initialState = ImmutableMap({
items: ImmutableList(),
items: ImmutableOrderedSet(),
next: null,
isLoading: false,
});