diff --git a/client/coral-framework/graphql/fragments.js b/client/coral-framework/graphql/fragments.js
index 94021d133..c5704f719 100644
--- a/client/coral-framework/graphql/fragments.js
+++ b/client/coral-framework/graphql/fragments.js
@@ -26,9 +26,6 @@ export default {
'UpdateAssetSettingsResponse',
'UpdateAssetStatusResponse',
'UpdateSettingsResponse',
- 'RequestAccountDeletionResponse',
- 'RequestDownloadLinkResponse',
- 'CancelAccountDeletionResponse',
'ChangePasswordResponse'
),
};
diff --git a/plugin-api/beta/client/utils/index.js b/plugin-api/beta/client/utils/index.js
index 3fe742569..aeb9841f9 100644
--- a/plugin-api/beta/client/utils/index.js
+++ b/plugin-api/beta/client/utils/index.js
@@ -8,4 +8,5 @@ export {
getErrorMessages,
getDefinitionName,
getShallowChanges,
+ createDefaultResponseFragments,
} from 'coral-framework/utils';
diff --git a/plugins/talk-plugin-profile-data/client/components/DownloadCommentHistory.js b/plugins/talk-plugin-profile-data/client/components/DownloadCommentHistory.js
index 06fa1fa89..398e2a640 100644
--- a/plugins/talk-plugin-profile-data/client/components/DownloadCommentHistory.js
+++ b/plugins/talk-plugin-profile-data/client/components/DownloadCommentHistory.js
@@ -3,6 +3,7 @@ import PropTypes from 'prop-types';
import { t } from 'plugin-api/beta/client/services';
import { Button } from 'plugin-api/beta/client/components/ui';
import styles from './DownloadCommentHistory.css';
+import { getErrorMessages } from 'coral-framework/utils';
export const readableDuration = durAsHours => {
const durAsDays = Math.ceil(durAsHours / 24);
@@ -19,14 +20,25 @@ export const readableDuration = durAsHours => {
class DownloadCommentHistory extends Component {
static propTypes = {
requestDownloadLink: PropTypes.func.isRequired,
+ notify: PropTypes.func.isRequired,
root: PropTypes.object.isRequired,
};
+ requestDownloadLink = async () => {
+ const { requestDownloadLink, notify } = this.props;
+ try {
+ await requestDownloadLink();
+ notify(
+ 'success',
+ 'Account Download Preparing - Check your email shortly for a download link'
+ );
+ } catch (err) {
+ notify('error', getErrorMessages(err));
+ }
+ };
+
render() {
- const {
- root: { me: { lastAccountDownload } },
- requestDownloadLink,
- } = this.props;
+ const { root: { me: { lastAccountDownload } } } = this.props;
const now = new Date();
const lastAccountDownloadDate =
@@ -52,7 +64,7 @@ class DownloadCommentHistory extends Component {
)}
{canRequestDownload ? (
-