import React, { useContext } from 'react'; import { Box, CircularProgress, Tooltip } from '@mui/material'; import { TorIcon } from './Icons'; import { useTranslation } from 'react-i18next'; import { AppContext, type UseAppStoreType } from '../contexts/AppContext'; interface TorIndicatorProps { color: 'inherit' | 'error' | 'warning' | 'success' | 'primary' | 'secondary' | 'info' | undefined; tooltipOpen?: boolean | undefined; title: string; progress: boolean; } const TorIndicator = ({ color, tooltipOpen = undefined, title, progress, }: TorIndicatorProps): JSX.Element => { return ( {progress ? ( <> ) : ( )} ); }; const TorConnectionBadge = (): JSX.Element => { const { torStatus, settings } = useContext(AppContext); const { t } = useTranslation(); if (window?.NativeRobosats == null || !settings.useProxy) { return <>; } if (torStatus === 'OFF' || torStatus === 'STOPPING') { return ( ); } else if (torStatus === 'STARTING') { return ( ); } else if (torStatus === 'ON') { return ; } else { return ( ); } }; export default TorConnectionBadge;