ghost-portal/packages/page-accounts/src/modals/ExternalWarning.tsx
2024-01-08 15:06:30 +02:00

25 lines
876 B
TypeScript

// Copyright 2017-2024 @polkadot/app-accounts authors & contributors
// SPDX-License-Identifier: Apache-2.0
import React from 'react';
import { MarkWarning } from '@polkadot/react-components';
import { useTranslation } from '../translate.js';
const isElectron = navigator.userAgent.toLowerCase().indexOf(' electron/') > -1;
function ExternalWarning (): React.ReactElement | null {
const { t } = useTranslation();
if (isElectron) {
return null;
}
return (
<MarkWarning content={<>{t('Consider storing your account in a signer such as a browser extension, hardware device, QR-capable phone wallet (non-connected) or desktop application for optimal account security.')}&nbsp;{t('Future versions of the web-only interface will drop support for non-external accounts, much like the IPFS version.')}</>} />
);
}
export default React.memo(ExternalWarning);