fix onion path status light for orange color
parent
6c1cac9203
commit
9a08ab68bc
@ -0,0 +1,23 @@
|
||||
import { createSelector } from 'reselect';
|
||||
|
||||
import { StateType } from '../reducer';
|
||||
import { SectionType } from '../../components/session/ActionsPanel';
|
||||
import { OnionState } from '../ducks/onion';
|
||||
import { Snode } from '../../data/data';
|
||||
|
||||
export const getOnionPaths = (state: StateType): OnionState => state.onionPaths;
|
||||
|
||||
export const getOnionPathsCount = createSelector(
|
||||
getOnionPaths,
|
||||
(state: OnionState): SectionType => state.snodePaths.length
|
||||
);
|
||||
|
||||
export const getFirstOnionPath = createSelector(
|
||||
getOnionPaths,
|
||||
(state: OnionState): Array<Snode> => state.snodePaths?.[0] || []
|
||||
);
|
||||
|
||||
export const getFirstOnionPathLength = createSelector(
|
||||
getFirstOnionPath,
|
||||
(state: Array<Snode>): number => state.length || 0
|
||||
);
|
Loading…
Reference in New Issue