mirror of
https://github.com/Prowlarr/Prowlarr
synced 2025-12-06 08:34:28 +01:00
15 lines
394 B
JavaScript
15 lines
394 B
JavaScript
import { createSelector } from 'reselect';
|
|
|
|
function createAppProfileSelector() {
|
|
return createSelector(
|
|
(state, { appProfileId }) => appProfileId,
|
|
(state) => state.settings.appProfiles.items,
|
|
(appProfileId, appProfiles) => {
|
|
return appProfiles.find((profile) => {
|
|
return profile.id === appProfileId;
|
|
});
|
|
}
|
|
);
|
|
}
|
|
|
|
export default createAppProfileSelector;
|