Merge branch 'master' into gdpr-email

This commit is contained in:
Wyatt Johnson
2018-05-03 15:18:22 -06:00
51 changed files with 1689 additions and 63 deletions
@@ -0,0 +1,25 @@
import { compose, gql } from 'react-apollo';
import { bindActionCreators } from 'redux';
import { connect, withFragments, excludeIf } from 'plugin-api/beta/client/hocs';
import AccountDeletionRequestedSign from '../components/AccountDeletionRequestedSign';
import { notify } from 'coral-framework/actions/notification';
import { withCancelAccountDeletion } from '../hocs';
const mapDispatchToProps = dispatch => bindActionCreators({ notify }, dispatch);
const withData = withFragments({
root: gql`
fragment Talk_AccountDeletionRequestedSignIn_root on RootQuery {
me {
scheduledDeletionDate
}
}
`,
});
export default compose(
connect(null, mapDispatchToProps),
withCancelAccountDeletion,
withData,
excludeIf(({ root: { me } }) => !me || !me.scheduledDeletionDate)
)(AccountDeletionRequestedSign);
@@ -0,0 +1,28 @@
import { compose, gql } from 'react-apollo';
import { bindActionCreators } from 'redux';
import { connect, withFragments } from 'plugin-api/beta/client/hocs';
import DeleteMyAccount from '../components/DeleteMyAccount';
import { notify } from 'coral-framework/actions/notification';
import { withRequestAccountDeletion, withCancelAccountDeletion } from '../hocs';
const mapDispatchToProps = dispatch => bindActionCreators({ notify }, dispatch);
const withData = withFragments({
root: gql`
fragment Talk_DeleteMyAccount_root on RootQuery {
me {
scheduledDeletionDate
}
settings {
organizationContactEmail
}
}
`,
});
export default compose(
connect(null, mapDispatchToProps),
withRequestAccountDeletion,
withCancelAccountDeletion,
withData
)(DeleteMyAccount);
@@ -1,27 +1,36 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { bindActionCreators } from 'redux';
import { compose, gql } from 'react-apollo';
import DownloadCommentHistory from '../components/DownloadCommentHistory';
import { withFragments } from 'plugin-api/beta/client/hocs';
import { withRequestDownloadLink } from '../hocs';
import { connect, withFragments } from 'plugin-api/beta/client/hocs';
import { withRequestDownloadLink } from '../hocs';
import { notify } from 'coral-framework/actions/notification';
class DownloadCommentHistoryContainer extends Component {
static propTypes = {
requestDownloadLink: PropTypes.func.isRequired,
root: PropTypes.object.isRequired,
notify: PropTypes.func.isRequired,
};
render() {
return (
<DownloadCommentHistory
root={this.props.root}
notify={this.props.notify}
requestDownloadLink={this.props.requestDownloadLink}
/>
);
}
}
const mapDispatchToProps = dispatch => bindActionCreators({ notify }, dispatch);
const enhance = compose(
connect(null, mapDispatchToProps),
withFragments({
root: gql`
fragment TalkDownloadCommentHistory_DownloadCommentHistorySection_root on RootQuery {