robosats/frontend/src/components/Dialogs/Learn.tsx

50 lines
1.1 KiB
TypeScript
Raw Normal View History

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,
Button,
2022-09-09 17:18:04 +00:00
Link,
} from '@mui/material';
2022-05-08 22:07:49 +00:00
interface Props {
2022-05-08 22:07:49 +00:00
open: boolean;
onClose: () => void;
}
2022-05-08 22:07:49 +00:00
2022-09-09 17:18:04 +00:00
const LearnDialog = ({ 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('Learn RoboSats')}</DialogTitle>
2022-05-08 22:07:49 +00:00
<DialogContent>
<DialogContentText>
2022-09-09 17:18:04 +00:00
{t(
'You are about to visit Learn RoboSats. It hosts tutorials and documentation to help you learn how to use RoboSats and understand how it works.',
)}
2022-05-08 22:07:49 +00:00
</DialogContentText>
</DialogContent>
<DialogActions>
2022-09-09 17:18:04 +00:00
<Button onClick={onClose}>{t('Back')}</Button>
<Button
onClick={onClose}
autoFocus
component={Link}
href='https://learn.robosats.com'
target='_blank'
>
{t("Let's go!")}
</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 LearnDialog;