added email to final step

This commit is contained in:
Wyatt Johnson
2018-05-03 10:02:33 -06:00
parent 0caa82c1c4
commit 6485b1f080
6 changed files with 17 additions and 5 deletions
@@ -57,7 +57,7 @@ class OrganizationSettings extends React.Component {
}
const updater = { organizationContactEmail: { $set: email } };
const errorUpdater = { organizationEmail: { $set: error } };
const errorUpdater = { organizationContactEmail: { $set: error } };
this.props.updatePending({ updater, errorUpdater });
};
@@ -48,7 +48,10 @@ class DeleteMyAccount extends React.Component {
};
render() {
const { me: { scheduledDeletionDate } } = this.props.root;
const {
me: { scheduledDeletionDate },
settings: { organizationContactEmail },
} = this.props.root;
return (
<div className="talk-plugin-auth--delete-my-account">
<DeleteMyAccountDialog
@@ -56,6 +59,7 @@ class DeleteMyAccount extends React.Component {
showDialog={this.state.showDialog}
closeDialog={this.closeDialog}
scheduledDeletionDate={scheduledDeletionDate}
organizationContactEmail={organizationContactEmail}
/>
<h3
className={cn(
@@ -42,7 +42,7 @@ class DeleteMyAccountDialog extends React.Component {
render() {
const { step } = this.state;
const { scheduledDeletionDate } = this.props;
const { scheduledDeletionDate, organizationContactEmail } = this.props;
return (
<Dialog open={this.props.showDialog} className={styles.dialog}>
@@ -81,6 +81,7 @@ class DeleteMyAccountDialog extends React.Component {
{step === 4 && (
<DeleteMyAccountFinalStep
scheduledDeletionDate={scheduledDeletionDate}
organizationContactEmail={organizationContactEmail}
finish={this.cancel}
/>
)}
@@ -94,6 +95,7 @@ DeleteMyAccountDialog.propTypes = {
closeDialog: PropTypes.func.isRequired,
requestAccountDeletion: PropTypes.func.isRequired,
scheduledDeletionDate: PropTypes.string,
organizationContactEmail: PropTypes.string.isRequired,
};
export default DeleteMyAccountDialog;
@@ -31,7 +31,10 @@ const DeleteMyAccountFinalStep = props => (
<p className={styles.description}>
<strong>Tell us why.</strong> We would like to know why you chose to
delete your account. Send us feedback on our comment system by emailing.
delete your account. Send us feedback on our comment system by emailing{' '}
<a href={`mailto:${props.organizationContactEmail}`}>
{props.organizationContactEmail}
</a>.
</p>
<div className={cn(styles.actions, styles.columnView)}>
@@ -49,6 +52,7 @@ const DeleteMyAccountFinalStep = props => (
DeleteMyAccountFinalStep.propTypes = {
finish: PropTypes.func.isRequired,
scheduledDeletionDate: PropTypes.string.isRequired,
organizationContactEmail: PropTypes.string.isRequired,
};
export default DeleteMyAccountFinalStep;
@@ -16,6 +16,9 @@ const withData = withFragments({
me {
scheduledDeletionDate
}
settings {
organizationContactEmail
}
}
`,
});
@@ -32,7 +32,6 @@ export const withRequestAccountDeletion = withMutation(
return mutate({
variables: {},
update: proxy => {
debugger;
const RequestAccountDeletionQuery = gql`
query Talk_CancelAccountDeletion {
me {