import React from 'react'; import PropTypes from 'prop-types'; import styles from './DeleteMyAccountDialog.css'; import { Dialog } from 'plugin-api/beta/client/components/ui'; import StepProgress from './StepProgress'; import DeleteMyAccountStep0 from './DeleteMyAccountStep0'; import DeleteMyAccountStep1 from './DeleteMyAccountStep1'; import DeleteMyAccountStep2 from './DeleteMyAccountStep2'; import DeleteMyAccountStep3 from './DeleteMyAccountStep3'; import DeleteMyAccountFinalStep from './DeleteMyAccountFinalStep'; const initialState = { step: 0 }; class DeleteMyAccountDialog extends React.Component { state = initialState; goToNextStep = () => { this.setState(state => ({ step: state.step + 1, })); }; clear = () => { this.setState(initialState); }; cancel = () => { this.clear(); this.props.closeDialog(); }; render() { const { step } = this.state; return ( ×

Delete My Account

{step === 0 && ( )} {step === 1 && ( )} {step === 2 && ( )} {step === 3 && ( )} {step === 4 && }
); } } DeleteMyAccountDialog.propTypes = { showDialog: PropTypes.bool.isRequired, closeDialog: PropTypes.func.isRequired, requestAccountDeletion: PropTypes.func.isRequired, }; export default DeleteMyAccountDialog;