mirror of
https://github.com/Sonarr/Sonarr.git
synced 2026-04-22 22:16:13 -04:00
16 lines
549 B
TypeScript
16 lines
549 B
TypeScript
import { createSelector } from 'reselect';
|
|
import RootFolderAppState from 'App/State/RootFolderAppState';
|
|
import createSortedSectionSelector from 'Store/Selectors/createSortedSectionSelector';
|
|
import RootFolder from 'typings/RootFolder';
|
|
import sortByProp from 'Utilities/Array/sortByProp';
|
|
|
|
export default function createRootFoldersSelector() {
|
|
return createSelector(
|
|
createSortedSectionSelector<RootFolder, RootFolderAppState>(
|
|
'rootFolders',
|
|
sortByProp('path')
|
|
),
|
|
(rootFolders: RootFolderAppState) => rootFolders
|
|
);
|
|
}
|