lbry-desktop/ui/js/selectors/settings.js

19 lines
446 B
JavaScript
Raw Normal View History

2017-06-06 23:19:12 +02:00
import { createSelector } from "reselect";
2017-06-06 06:21:55 +02:00
const _selectState = state => state.settings || {};
export const selectDaemonSettings = createSelector(
_selectState,
2017-06-06 23:19:12 +02:00
state => state.daemonSettings || {}
2017-06-06 06:21:55 +02:00
);
export const selectClientSettings = createSelector(
_selectState,
2017-06-06 23:19:12 +02:00
state => state.clientSettings
2017-06-06 06:21:55 +02:00
);
export const selectSettingsIsGenerous = createSelector(
selectDaemonSettings,
2017-06-06 23:19:12 +02:00
settings => settings && settings.is_generous_host
2017-06-06 06:21:55 +02:00
);