import { Button, Dialog, DialogActions, DialogContent, DialogTitle, Typography, } from "@mui/material"; import { useNavigate } from "react-router-dom"; import { APITokenURL, CreatedAPIToken } from "../api/TokensApi"; import { CopyToClipboard } from "../widgets/CopyToClipboard"; import { InlineCode } from "../widgets/InlineCode"; export function CreatedTokenDialog(p: { createdToken: CreatedAPIToken; }): React.ReactElement { const navigate = useNavigate(); const close = () => { navigate(APITokenURL(p.createdToken.token)); }; return ( Token successfully created Your token was successfully created. You need now to copy the private key, as it will be technically impossible to recover it after closing this dialog. ); } function InfoBlock( p: React.PropsWithChildren<{ label: string; value: string }> ): React.ReactElement { return (
{p.label} {p.value}
); }