mirror of
https://github.com/RoboSats/robosats.git
synced 2025-02-08 06:19:03 +00:00
227610c84a
commita5b63aed93
Author: Reckless_Satoshi <reckless.satoshi@protonmail.com> Date: Sun Oct 30 10:46:05 2022 -0700 Small fixes commitd64adfc2bf
Author: Reckless_Satoshi <reckless.satoshi@protonmail.com> Date: Sun Oct 30 06:02:06 2022 -0700 wip work on federation settings commitca35d6b3d2
Author: Reckless_Satoshi <reckless.satoshi@protonmail.com> Date: Sun Oct 30 04:05:33 2022 -0700 Refactor confirmation Dialogs commitc660a5b0d1
Author: Reckless_Satoshi <reckless.satoshi@protonmail.com> Date: Sat Oct 29 13:36:59 2022 -0700 refactor login (clean separation robot/info. Style navbar. commitb9dc7f7c95
Author: Reckless_Satoshi <reckless.satoshi@protonmail.com> Date: Fri Oct 28 09:54:38 2022 -0700 Add size slider and settings widget commit20b2b3dcd6
Author: Reckless_Satoshi <reckless.satoshi@protonmail.com> Date: Fri Oct 28 05:41:48 2022 -0700 Add show more and Dialogs commitda8b70091b
Author: Reckless_Satoshi <reckless.satoshi@protonmail.com> Date: Thu Oct 27 16:26:07 2022 -0700 Add sliding pages commit6dd90aa118
Author: Reckless_Satoshi <reckless.satoshi@protonmail.com> Date: Thu Oct 27 06:34:58 2022 -0700 Add settings forms commitd3d0f3ee1a
Author: Reckless_Satoshi <reckless.satoshi@protonmail.com> Date: Wed Oct 26 04:16:06 2022 -0700 Refactor utils
48 lines
1.1 KiB
TypeScript
48 lines
1.1 KiB
TypeScript
import React from 'react';
|
|
import { useTranslation } from 'react-i18next';
|
|
import {
|
|
Dialog,
|
|
DialogTitle,
|
|
DialogActions,
|
|
DialogContent,
|
|
DialogContentText,
|
|
Button,
|
|
} from '@mui/material';
|
|
import { useHistory } from 'react-router-dom';
|
|
import { Page } from '../../basic/NavBar';
|
|
|
|
interface Props {
|
|
open: boolean;
|
|
onClose: () => void;
|
|
setPage: (state: Page) => void;
|
|
}
|
|
|
|
const NoRobotDialog = ({ open, onClose, setPage }: Props): JSX.Element => {
|
|
const { t } = useTranslation();
|
|
const history = useHistory();
|
|
|
|
const handleClickGenerate = function () {
|
|
onClose();
|
|
setPage('robot');
|
|
history.push('/robot');
|
|
};
|
|
|
|
return (
|
|
<Dialog open={open} onClose={onClose}>
|
|
<DialogTitle>{t('You do not have a robot avatar')}</DialogTitle>
|
|
|
|
<DialogContent>
|
|
<DialogContentText>
|
|
{t('Generate a robot avatar first. Then create your own order.')}
|
|
</DialogContentText>
|
|
</DialogContent>
|
|
|
|
<DialogActions>
|
|
<Button onClick={handleClickGenerate}>{t('Generate Robot')}</Button>
|
|
</DialogActions>
|
|
</Dialog>
|
|
);
|
|
};
|
|
|
|
export default NoRobotDialog;
|