diff --git a/plugins/talk-plugin-profile-data/client/components/AccountDeletionRequestedSign.js b/plugins/talk-plugin-profile-data/client/components/AccountDeletionRequestedSign.js
index 7da172a31..31f65ffa7 100644
--- a/plugins/talk-plugin-profile-data/client/components/AccountDeletionRequestedSign.js
+++ b/plugins/talk-plugin-profile-data/client/components/AccountDeletionRequestedSign.js
@@ -27,7 +27,7 @@ class AccountDeletionRequestedSign extends React.Component {
'MMM Do YYYY, h:mm:ss a'
);
const deletionScheduledOn = moment(scheduledDeletionDate)
- .subtract(12, 'hours')
+ .subtract(24, 'hours')
.format('MMM Do YYYY, h:mm:ss a');
return (
diff --git a/plugins/talk-plugin-profile-data/client/components/DeleteMyAccount.js b/plugins/talk-plugin-profile-data/client/components/DeleteMyAccount.js
index 9bc5573a1..982437de0 100644
--- a/plugins/talk-plugin-profile-data/client/components/DeleteMyAccount.js
+++ b/plugins/talk-plugin-profile-data/client/components/DeleteMyAccount.js
@@ -55,6 +55,7 @@ class DeleteMyAccount extends React.Component {
requestAccountDeletion={this.requestAccountDeletion}
showDialog={this.state.showDialog}
closeDialog={this.closeDialog}
+ scheduledDeletionDate={scheduledDeletionDate}
/>
@@ -76,7 +78,12 @@ class DeleteMyAccountDialog extends React.Component {
onChange={this.onChange}
/>
)}
- {step === 4 && }
+ {step === 4 && (
+
+ )}
);
}
@@ -86,6 +93,7 @@ DeleteMyAccountDialog.propTypes = {
showDialog: PropTypes.bool.isRequired,
closeDialog: PropTypes.func.isRequired,
requestAccountDeletion: PropTypes.func.isRequired,
+ scheduledDeletionDate: PropTypes.string,
};
export default DeleteMyAccountDialog;
diff --git a/plugins/talk-plugin-profile-data/client/components/DeleteMyAccountFinalStep.js b/plugins/talk-plugin-profile-data/client/components/DeleteMyAccountFinalStep.js
index 4cda90347..d3604d1ae 100644
--- a/plugins/talk-plugin-profile-data/client/components/DeleteMyAccountFinalStep.js
+++ b/plugins/talk-plugin-profile-data/client/components/DeleteMyAccountFinalStep.js
@@ -3,6 +3,7 @@ import cn from 'classnames';
import PropTypes from 'prop-types';
import { Button, Icon } from 'plugin-api/beta/client/components/ui';
import styles from './DeleteMyAccountStep.css';
+import moment from 'moment';
const DeleteMyAccountFinalStep = props => (
@@ -17,7 +18,9 @@ const DeleteMyAccountFinalStep = props => (
- Account Deletion Date and Time
+
+ {moment(props.scheduledDeletionDate).format('MMM Do YYYY, h:mm:ss a')}
+
@@ -45,6 +48,7 @@ const DeleteMyAccountFinalStep = props => (
DeleteMyAccountFinalStep.propTypes = {
finish: PropTypes.func.isRequired,
+ scheduledDeletionDate: PropTypes.string.isRequired,
};
export default DeleteMyAccountFinalStep;
diff --git a/plugins/talk-plugin-profile-data/client/mutations.js b/plugins/talk-plugin-profile-data/client/mutations.js
index 3ae0d88f7..d2a8881b8 100644
--- a/plugins/talk-plugin-profile-data/client/mutations.js
+++ b/plugins/talk-plugin-profile-data/client/mutations.js
@@ -32,6 +32,7 @@ export const withRequestAccountDeletion = withMutation(
return mutate({
variables: {},
update: proxy => {
+ debugger;
const RequestAccountDeletionQuery = gql`
query Talk_CancelAccountDeletion {
me {
@@ -46,7 +47,7 @@ export const withRequestAccountDeletion = withMutation(
});
const scheduledDeletionDate = moment()
- .add(12, 'hours')
+ .add(24, 'hours')
.toDate();
const data = update(prev, {
diff --git a/plugins/talk-plugin-profile-data/server/mutators.js b/plugins/talk-plugin-profile-data/server/mutators.js
index d3785c951..c895e51d8 100644
--- a/plugins/talk-plugin-profile-data/server/mutators.js
+++ b/plugins/talk-plugin-profile-data/server/mutators.js
@@ -93,16 +93,16 @@ async function sendDownloadLink(ctx) {
}
// requestDeletion will schedule the current user to have their account deleted
-// by setting the `scheduledDeletionDate` on the user 12 hours from now.
+// by setting the `scheduledDeletionDate` on the user 24 hours from now.
async function requestDeletion({ user, connectors: { models: { User } } }) {
// Ensure the user doesn't already have a deletion scheduled.
if (get(user, 'metadata.scheduledDeletionDate')) {
throw new ErrDeletionAlreadyScheduled();
}
- // Get the date in the future 12 hours from now.
+ // Get the date in the future 24 hours from now.
const scheduledDeletionDate = moment()
- .add(12, 'hours')
+ .add(24, 'hours')
.toDate();
// Amend the scheduledDeletionDate on the user.