Change design of lists in web UI (#32881)

This commit is contained in:
Eugen Rochko 2024-11-21 17:10:04 +01:00 committed by GitHub
parent 7385016837
commit 62603508c7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
39 changed files with 1395 additions and 1350 deletions

View 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(),
);