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 ;
}
2024-01-02 17:13:20 +00:00
const WarningDialog = ( { open , onClose , longAlias } : Props ) : JSX . Element = > {
2024-01-02 12:40:05 +00:00
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 >
) ;
} ;
2024-01-02 17:13:20 +00:00
export default WarningDialog ;