Add kind prop to vesting contract migration modal

This commit is contained in:
Mark Sinclair
2024-07-18 17:32:11 +01:00
committed by fmtabbara
parent 61fcd4ac69
commit 444c787d0a
2 changed files with 9 additions and 7 deletions
@@ -6,19 +6,20 @@ import DialogContent from '@mui/material/DialogContent';
import DialogContentText from '@mui/material/DialogContentText';
import DialogTitle from '@mui/material/DialogTitle';
export const VestingWarningModal: FC<{ isVisible: boolean; handleClose: (result: 'yes' | 'no') => void }> = ({
isVisible,
handleClose,
}) => (
export const VestingWarningModal: FC<{
kind: 'delegations' | 'bond';
isVisible: boolean;
handleClose: (result: 'yes' | 'no') => void;
}> = ({ kind, isVisible, handleClose }) => (
<Dialog open={isVisible} onClose={handleClose}>
<DialogTitle>Migrate all of your delegations?</DialogTitle>
<DialogTitle>Migrate your {kind}?</DialogTitle>
<DialogContent>
<DialogContentText>
By clicking <strong>yes</strong> we will migrate your delegations to the mixnet contract.
By clicking <strong>yes</strong> we will migrate your {kind} to the mixnet contract.
</DialogContentText>
<DialogContentText sx={{ mt: 2 }}>
The operation will be instant, you will keep your rewards and they will continue to accumulate. Once migrated,
you will be able to withdraw you rewards.
you will be able to withdraw your rewards.
</DialogContentText>
</DialogContent>
<DialogActions>
@@ -350,6 +350,7 @@ export const Delegation: FC<{ isStorybook?: boolean }> = ({ isStorybook }) => {
</Button>
</Alert>
<VestingWarningModal
kind="delegations"
isVisible={showVestingWarningModal}
handleClose={(result) => {
setShowVestingWarningModal(false);