laconic-wallet-web/src/components/TxErrorDialog.tsx
nabarun cd0f6fa5d2 Replace photon with alnt for laconicd network (#6)
Part of [laconicd testnet validator enrollment](https://www.notion.so/laconicd-testnet-validator-enrollment-6fc1d3cafcc64fef8c5ed3affa27c675)

- Use MUI dialog component for tx error

Co-authored-by: IshaVenikar <ishavenikar7@gmail.com>
Co-authored-by: Shreerang Kale <shreerangkale@gmail.com>
Reviewed-on: cerc-io/laconic-wallet-web#6
2024-07-30 12:18:53 +00:00

27 lines
626 B
TypeScript

import React from 'react';
import { Dialog, DialogTitle, DialogContent, DialogActions, Button, Typography } from '@mui/material';
const TxErrorDialog = ({
error,
visible,
hideDialog,
}: {
error: string;
visible: boolean;
hideDialog: () => void;
}) => {
return (
<Dialog open={visible} onClose={hideDialog}>
<DialogTitle>Transaction Error</DialogTitle>
<DialogContent>
<Typography variant="body1">{error}</Typography>
</DialogContent>
<DialogActions>
<Button onClick={hideDialog}>OK</Button>
</DialogActions>
</Dialog>
);
};
export default TxErrorDialog;