2022-09-09 17:18:04 +00:00
|
|
|
import React from 'react';
|
|
|
|
import { useTranslation } from 'react-i18next';
|
2022-05-08 22:07:49 +00:00
|
|
|
import {
|
|
|
|
Dialog,
|
|
|
|
DialogTitle,
|
2022-09-09 17:18:04 +00:00
|
|
|
DialogActions,
|
2022-05-08 22:07:49 +00:00
|
|
|
DialogContent,
|
|
|
|
DialogContentText,
|
2022-09-09 17:18:04 +00:00
|
|
|
Button,
|
|
|
|
} from '@mui/material';
|
|
|
|
import { Link } from 'react-router-dom';
|
2022-05-08 22:07:49 +00:00
|
|
|
|
|
|
|
type Props = {
|
|
|
|
open: boolean;
|
|
|
|
onClose: () => void;
|
2022-09-09 17:18:04 +00:00
|
|
|
};
|
2022-05-08 22:07:49 +00:00
|
|
|
|
2022-09-09 17:18:04 +00:00
|
|
|
const NoRobotDialog = ({ open, onClose }: Props): JSX.Element => {
|
2022-05-08 22:07:49 +00:00
|
|
|
const { t } = useTranslation();
|
|
|
|
|
|
|
|
return (
|
2022-09-09 17:18:04 +00:00
|
|
|
<Dialog open={open} onClose={onClose}>
|
|
|
|
<DialogTitle>{t('You do not have a robot avatar')}</DialogTitle>
|
2022-05-08 22:07:49 +00:00
|
|
|
|
|
|
|
<DialogContent>
|
|
|
|
<DialogContentText>
|
2022-09-09 17:18:04 +00:00
|
|
|
{t('You need to generate a robot avatar in order to become an order maker')}
|
2022-05-08 22:07:49 +00:00
|
|
|
</DialogContentText>
|
|
|
|
</DialogContent>
|
|
|
|
|
|
|
|
<DialogActions>
|
2022-09-09 17:18:04 +00:00
|
|
|
<Button onClick={onClose} autoFocus>
|
|
|
|
{t('Go back')}
|
|
|
|
</Button>
|
|
|
|
<Button onClick={onClose} to='/' component={Link}>
|
|
|
|
{t('Generate Robot')}
|
|
|
|
</Button>
|
2022-05-08 22:07:49 +00:00
|
|
|
</DialogActions>
|
|
|
|
</Dialog>
|
2022-09-09 17:18:04 +00:00
|
|
|
);
|
|
|
|
};
|
2022-05-08 22:07:49 +00:00
|
|
|
|
|
|
|
export default NoRobotDialog;
|