mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-15 16:59:41 +00:00
[Glitch] Change design of lists in web UI
Port 62603508c7 to glitch-soc
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
15
app/javascript/flavours/glitch/selectors/lists.ts
Normal file
15
app/javascript/flavours/glitch/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 'flavours/glitch/models/list';
|
||||
import type { RootState } from 'flavours/glitch/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(),
|
||||
);
|
||||
Reference in New Issue
Block a user