import React, { useEffect, useState } from 'react'; import { Box, CircularProgress, Tooltip } from '@mui/material'; import { TorIcon } from './Icons'; import { useTranslation } from 'react-i18next'; const TorConnection = (): JSX.Element => { const [torStatus, setTorStatus] = useState('NOTINIT'); const { t } = useTranslation(); useEffect(() => { window.addEventListener('torStatus', (event) => { setTorStatus(event?.detail); }); }, []); if (window?.NativeRobosats && (torStatus === 'NOTINIT' || torStatus === 'STARTING')) { return ( ); } else if (window?.NativeRobosats && (torStatus === '"Done"' || torStatus === 'DONE')) { return ( ); } else if (true) { return ( ); } }; export default TorConnection;