2017-05-26 06:20:00 +00:00
|
|
|
import { createSelector } from 'reselect';
|
2018-04-25 03:36:27 +00:00
|
|
|
import get from 'lodash/get';
|
2017-05-26 06:20:00 +00:00
|
|
|
import { getServers } from './servers';
|
|
|
|
import { getSelectedTab } from './tab';
|
|
|
|
|
|
|
|
// eslint-disable-next-line import/prefer-default-export
|
|
|
|
export const getSelectedTabTitle = createSelector(
|
|
|
|
getSelectedTab,
|
|
|
|
getServers,
|
2018-04-25 03:36:27 +00:00
|
|
|
(tab, servers) => tab.name || get(servers, [tab.server, 'name'])
|
2017-05-26 06:20:00 +00:00
|
|
|
);
|