dispatch/client/js/state/selectors.js

12 lines
370 B
JavaScript
Raw Normal View History

import { createSelector } from 'reselect';
2018-04-25 03:36:27 +00:00
import get from 'lodash/get';
2020-06-15 08:58:51 +00:00
import { getNetworks } from './networks';
import { getSelectedTab } from './tab';
// eslint-disable-next-line import/prefer-default-export
export const getSelectedTabTitle = createSelector(
getSelectedTab,
2020-06-15 08:58:51 +00:00
getNetworks,
(tab, networks) => tab.name || get(networks, [tab.network, 'name'])
);