import React, { useContext } from 'react'; import { useTranslation } from 'react-i18next'; import { Dialog, DialogTitle, Tooltip, IconButton, TextField, DialogActions, DialogContent, DialogContentText, Button, Grid, } from '@mui/material'; import { systemClient } from '../../services/System'; import ContentCopy from '@mui/icons-material/ContentCopy'; import { GarageContext, type UseGarageStoreType } from '../../contexts/GarageContext'; interface Props { open: boolean; onClose: () => void; onClickBack: () => void; onClickDone: () => void; } const StoreTokenDialog = ({ open, onClose, onClickBack, onClickDone }: Props): JSX.Element => { const { garage } = useContext(GarageContext); const { t } = useTranslation(); return ( {t('Store your robot token')} {t( 'You might need to recover your robot avatar in the future: store it safely. You can simply copy it into another application.', )}
{ systemClient.copyToClipboard(garage.getSlot()?.token ?? ''); }} > ), }} />
); }; export default StoreTokenDialog;