mirror of
https://github.com/RoboSats/robosats.git
synced 2025-02-21 12:49:02 +00:00
Merge pull request #1734 from RoboSats/hide-secure-alert-notification-on-onion-address
Fix react
This commit is contained in:
commit
a74c477dc7
@ -32,6 +32,7 @@ function federationUrls(): string[] {
|
||||
export const safeUrls = federationUrls();
|
||||
|
||||
const UnsafeAlert = (): JSX.Element => {
|
||||
const { hostUrl } = useContext<UseAppStoreType>(AppContext);
|
||||
const { windowSize } = useContext<UseAppStoreType>(AppContext);
|
||||
const { t } = useTranslation();
|
||||
const [show, setShow] = useState<boolean>(true);
|
||||
@ -47,8 +48,7 @@ const UnsafeAlert = (): JSX.Element => {
|
||||
checkClient();
|
||||
}, []);
|
||||
|
||||
// If alert is hidden return null
|
||||
if (!show) {
|
||||
if (hostUrl.endsWith('.onion') || !show) {
|
||||
return <></>;
|
||||
}
|
||||
|
||||
|
@ -9,7 +9,7 @@ const HostAlert = (): JSX.Element => {
|
||||
!hostUrl.includes('robosats') && (client === 'selfhosted' || client === 'desktop')
|
||||
? SelfhostedAlert
|
||||
: UnsafeAlert;
|
||||
return hostUrl.endsWith('.onion') ? <></> : component();
|
||||
return component();
|
||||
};
|
||||
|
||||
export default HostAlert;
|
||||
|
Loading…
Reference in New Issue
Block a user