import React, { Component } from 'react' import { withTranslation, Trans} from "react-i18next"; import {Paper, Alert, AlertTitle, Button, Link} from "@mui/material" import MediaQuery from 'react-responsive' class UnsafeAlert extends Component { constructor(props) { super(props); } state = { show: true, }; getHost(){ var url = (window.location != window.parent.location) ? this.getHost(document.referrer) : document.location.href; return url.split('/')[2] } safe_urls = [ 'robosats6tkf3eva7x2voqso3a5wcorsnw34jveyxfqi2fu7oyheasid.onion', 'robotestagw3dcxmd66r4rgksb4nmmr43fh77bzn2ia2eucduyeafnyd.onion', 'robodevs7ixniseezbv7uryxhamtz3hvcelzfwpx3rvoipttjomrmpqd.onion', ] render() { const { t, i18n} = this.props; return ( (!this.safe_urls.includes(this.getHost()) & this.state.show) ?
this.setState({show:false})}>{t("Hide")}} > {t("You are not using RoboSats privately")} Some features are disabled for your protection (e.g. chat) and you will not be able to complete a trade without them. To protect your privacy and fully enable RoboSats, use Tor Browser and visit the Onion site. {t("You are not using RoboSats privately")} You will not be able to complete a trade. Use Tor Browser and visit the Onion site.
: null ) } } export default withTranslation()(UnsafeAlert);