diff --git a/frontend/src/components/TorConnection/index.tsx b/frontend/src/components/TorConnection/index.tsx deleted file mode 100644 index 1eef3b9f..00000000 --- a/frontend/src/components/TorConnection/index.tsx +++ /dev/null @@ -1,67 +0,0 @@ -import React, { useContext } from 'react'; -import { Box, CircularProgress } from '@mui/material'; -import { TorIcon } from '../Icons'; -import { useTranslation } from 'react-i18next'; -import { AppContext, type UseAppStoreType } from '../../contexts/AppContext'; - -const TorConnectionBadge = (): React.JSX.Element => { - const { torStatus } = useContext(AppContext); - const { t } = useTranslation(); - - let color: - | 'inherit' - | 'error' - | 'warning' - | 'success' - | 'primary' - | 'secondary' - | 'info' - | undefined = 'error'; - let progress = true; - let title = t('Connection error'); - - if (torStatus === 'OFF' || torStatus === 'STOPPING') { - color = 'primary'; - progress = true; - title = t('Initializing Tor daemon'); - } else if (torStatus === 'STARTING') { - color = 'warning'; - progress = true; - title = t('Connecting to Tor network'); - } else if (torStatus === 'ON') { - color = 'success'; - progress = false; - title = t('Connected to Tor network'); - } - - return ( - - {progress ? ( - <> - - - - - - ) : ( - - - - )}{' '} - {title} - - ); -}; - -export default TorConnectionBadge;