mirror of https://github.com/glitch-soc/mastodon
16 lines
444 B
TypeScript
16 lines
444 B
TypeScript
import { createSelector } from '@reduxjs/toolkit';
|
|
import type { OrderedSet as ImmutableOrderedSet } from 'immutable';
|
|
|
|
import type { RootState } from 'flavours/glitch/store';
|
|
|
|
export const getStatusList = createSelector(
|
|
[
|
|
(
|
|
state: RootState,
|
|
type: 'favourites' | 'bookmarks' | 'pins' | 'trending',
|
|
) =>
|
|
state.status_lists.getIn([type, 'items']) as ImmutableOrderedSet<string>,
|
|
],
|
|
(items) => items.toList(),
|
|
);
|