You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
437 B
15 lines
437 B
import { createSelector } from '@reduxjs/toolkit'; |
|
import type { OrderedSet as ImmutableOrderedSet } from 'immutable'; |
|
|
|
import type { RootState } from 'mastodon/store'; |
|
|
|
export const getStatusList = createSelector( |
|
[ |
|
( |
|
state: RootState, |
|
type: 'favourites' | 'bookmarks' | 'pins' | 'trending', |
|
) => |
|
state.status_lists.getIn([type, 'items']) as ImmutableOrderedSet<string>, |
|
], |
|
(items) => items.toList(), |
|
);
|
|
|