You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
381 B
15 lines
381 B
6 years ago
|
import { createSelector } from 'reselect';
|
||
10 months ago
|
import AppState from 'App/State/AppState';
|
||
6 years ago
|
|
||
|
function createTagDetailsSelector() {
|
||
|
return createSelector(
|
||
10 months ago
|
(_: AppState, { id }: { id: number }) => id,
|
||
|
(state: AppState) => state.tags.details.items,
|
||
6 years ago
|
(id, tagDetails) => {
|
||
|
return tagDetails.find((t) => t.id === id);
|
||
|
}
|
||
|
);
|
||
|
}
|
||
|
|
||
|
export default createTagDetailsSelector;
|