import React from 'react'; import _ from 'lodash'; import { getTheme } from '../state/selectors/theme'; import electron from 'electron'; import { useSelector } from 'react-redux'; import { StateType } from '../state/reducer'; import { SessionIcon, SessionIconSize, SessionIconType } from './session/icon'; const { shell } = electron; import { SessionWrapperModal } from '../components/session/SessionWrapperModal'; import { Snode } from '../session/onions'; import ip2country from 'ip2country'; import countryLookup from 'country-code-lookup'; import { useTheme } from 'styled-components'; export type OnionPathModalType = { onConfirm?: () => void; onClose?: () => void; confirmText?: string; cancelText?: string; title?: string; }; export type StatusLightType = { glowStartDelay: number; glowDuration: number; color?: string; }; const OnionPathModalInner = (props: any) => { const onionNodes = useSelector((state: StateType) => state.onionPaths.snodePath); const onionPath = onionNodes.path; // including the device and destination in calculation const glowDuration = onionPath.length + 2; const nodes = [ { label: window.i18n('device'), }, ...onionNodes.path, , { label: window.i18n('destination'), }, ]; return (