robosats/frontend/src/basic/OrderPage/CautionDialog.tsx

42 lines
1.1 KiB
TypeScript
Raw Normal View History

2024-01-02 12:40:05 +00:00
import React from 'react';
import { useTranslation } from 'react-i18next';
import {
Dialog,
DialogTitle,
DialogActions,
DialogContent,
DialogContentText,
Button,
} from '@mui/material';
interface Props {
open: boolean;
onClose: () => void;
longAlias: string;
}
const CautionDialog = ({ open, onClose, longAlias }: Props): JSX.Element => {
const { t } = useTranslation();
return (
<Dialog open={open} onClose={onClose}>
<DialogTitle>{t('Warning')}</DialogTitle>
<DialogContent>
<DialogContentText>
{t(
'Coordinators of p2p trades are the source of trust, provide the infrastructure, pricing and will mediate in case of dispute. Make sure you research and trust "{{coordinator_name}}" before locking your bond. A malicious p2p coordinator can find ways to steal from you.',
{ coordinator_name: longAlias },
)}
</DialogContentText>
</DialogContent>
<DialogActions>
<Button onClick={onClose}>{t('I understand')}</Button>
</DialogActions>
</Dialog>
);
};
export default CautionDialog;