diff --git a/client/coral-admin/src/AppRouter.js b/client/coral-admin/src/AppRouter.js
index 76291ac56..9d68d592b 100644
--- a/client/coral-admin/src/AppRouter.js
+++ b/client/coral-admin/src/AppRouter.js
@@ -5,7 +5,7 @@ import { Router, Route, IndexRedirect, IndexRoute } from 'react-router';
import Configure from 'routes/Configure';
import Install from 'routes/Install';
import Stories from 'routes/Stories';
-import Community from 'routes/Community/containers/Community';
+import Community from 'routes/Community';
import { ModerationLayout, Moderation } from 'routes/Moderation';
import Layout from 'containers/Layout';
diff --git a/client/coral-admin/src/routes/Community/components/Community.js b/client/coral-admin/src/routes/Community/components/Community.js
index 06eac7f7b..87a41e09d 100644
--- a/client/coral-admin/src/routes/Community/components/Community.js
+++ b/client/coral-admin/src/routes/Community/components/Community.js
@@ -3,33 +3,22 @@ import PropTypes from 'prop-types';
import styles from './Community.css';
import People from '../containers/People';
import CommunityMenu from '../containers/CommunityMenu';
-import RejectUsernameDialog from './RejectUsernameDialog';
+import RejectUsernameDialog from '../containers/RejectUsernameDialog';
import FlaggedAccounts from '../containers/FlaggedAccounts';
class Community extends Component {
renderTab() {
- const { route, community, ...props } = this.props;
+ const { route } = this.props;
const activeTab = route.path === ':id' ? 'flagged' : route.path;
if (activeTab === 'people') {
- return (
-
- );
+ return ;
}
return (
-
-
+
+
);
}
@@ -46,11 +35,6 @@ class Community extends Component {
Community.propTypes = {
route: PropTypes.object,
- community: PropTypes.object,
- rejectUsername: PropTypes.func.isRequired,
- hideRejectUsernameDialog: PropTypes.func.isRequired,
- data: PropTypes.object,
- root: PropTypes.object,
};
export default Community;
diff --git a/client/coral-admin/src/routes/Community/components/RejectUsernameDialog.js b/client/coral-admin/src/routes/Community/components/RejectUsernameDialog.js
index 180a1375b..e25db4a34 100644
--- a/client/coral-admin/src/routes/Community/components/RejectUsernameDialog.js
+++ b/client/coral-admin/src/routes/Community/components/RejectUsernameDialog.js
@@ -94,7 +94,7 @@ class RejectUsernameDialog extends Component {
{/* {
- // Suspension Message: This functionality it's not entirely done on the BE - It will be released soon.
+ // Suspension Message: This functionality it's not entirely done on the BE - It will be released soon.
stage === 1 &&
{t('reject_username.write_message')}
diff --git a/client/coral-admin/src/routes/Community/containers/People.js b/client/coral-admin/src/routes/Community/containers/People.js
index b60d145e3..f8271b236 100644
--- a/client/coral-admin/src/routes/Community/containers/People.js
+++ b/client/coral-admin/src/routes/Community/containers/People.js
@@ -115,7 +115,6 @@ class PeopleContainer extends React.Component {
}
PeopleContainer.propTypes = {
- community: PropTypes.object,
setUserRole: PropTypes.func.isRequired,
unbanUser: PropTypes.func.isRequired,
unsuspendUser: PropTypes.func.isRequired,
diff --git a/client/coral-admin/src/routes/Community/containers/Community.js b/client/coral-admin/src/routes/Community/containers/RejectUsernameDialog.js
similarity index 69%
rename from client/coral-admin/src/routes/Community/containers/Community.js
rename to client/coral-admin/src/routes/Community/containers/RejectUsernameDialog.js
index 2ace2692e..325eadfb5 100644
--- a/client/coral-admin/src/routes/Community/containers/Community.js
+++ b/client/coral-admin/src/routes/Community/containers/RejectUsernameDialog.js
@@ -1,18 +1,19 @@
+import RejectUsernameDialog from '../components/RejectUsernameDialog';
+import { withRejectUsername } from 'coral-framework/graphql/mutations';
+import { hideRejectUsernameDialog } from '../../../actions/community';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import { compose } from 'react-apollo';
-import { withRejectUsername } from 'coral-framework/graphql/mutations';
-import { hideRejectUsernameDialog } from '../../../actions/community';
-import Community from '../components/Community';
const mapStateToProps = state => ({
- community: state.community,
+ user: state.community.user,
+ open: state.community.rejectUsernameDialog,
});
const mapDispatchToProps = dispatch =>
bindActionCreators(
{
- hideRejectUsernameDialog,
+ handleClose: hideRejectUsernameDialog,
},
dispatch
);
@@ -20,4 +21,4 @@ const mapDispatchToProps = dispatch =>
export default compose(
connect(mapStateToProps, mapDispatchToProps),
withRejectUsername
-)(Community);
+)(RejectUsernameDialog);
diff --git a/client/coral-admin/src/routes/Community/index.js b/client/coral-admin/src/routes/Community/index.js
new file mode 100644
index 000000000..4812de093
--- /dev/null
+++ b/client/coral-admin/src/routes/Community/index.js
@@ -0,0 +1 @@
+export { default } from './components/Community';