mirror of https://github.com/lidarr/Lidarr
15 lines
381 B
TypeScript
15 lines
381 B
TypeScript
import { createSelector } from 'reselect';
|
|
import AppState from 'App/State/AppState';
|
|
|
|
function createTagDetailsSelector() {
|
|
return createSelector(
|
|
(_: AppState, { id }: { id: number }) => id,
|
|
(state: AppState) => state.tags.details.items,
|
|
(id, tagDetails) => {
|
|
return tagDetails.find((t) => t.id === id);
|
|
}
|
|
);
|
|
}
|
|
|
|
export default createTagDetailsSelector;
|