Change design of lists in web UI (#32881)
This commit is contained in:
parent
7385016837
commit
62603508c7
39 changed files with 1395 additions and 1350 deletions
15
app/javascript/mastodon/selectors/lists.ts
Normal file
15
app/javascript/mastodon/selectors/lists.ts
Normal file
|
@ -0,0 +1,15 @@
|
|||
import { createSelector } from '@reduxjs/toolkit';
|
||||
import type { Map as ImmutableMap } from 'immutable';
|
||||
|
||||
import type { List } from 'mastodon/models/list';
|
||||
import type { RootState } from 'mastodon/store';
|
||||
|
||||
export const getOrderedLists = createSelector(
|
||||
[(state: RootState) => state.lists],
|
||||
(lists: ImmutableMap<string, List | null>) =>
|
||||
lists
|
||||
.toList()
|
||||
.filter((item: List | null) => !!item)
|
||||
.sort((a: List, b: List) => a.title.localeCompare(b.title))
|
||||
.toArray(),
|
||||
);
|
Loading…
Add table
Add a link
Reference in a new issue