update OrganizsationAccess and OrganizationAccessList w mountWithContexts

This commit is contained in:
John Mitchell
2019-04-18 17:18:19 -04:00
parent a6f79c646d
commit 54499dbf69
6 changed files with 54 additions and 142 deletions

View File

@@ -10,7 +10,8 @@ import { I18n, i18nMark } from '@lingui/react';
import { t, Trans } from '@lingui/macro';
import {
Link
Link,
withRouter
} from 'react-router-dom';
import { withNetwork } from '../../../contexts/Network';
@@ -160,8 +161,8 @@ class OrganizationAccessList extends React.Component {
}
getQueryParams (overrides = {}) {
const { location } = this.props;
const { search } = location;
const { history } = this.props;
const { search } = history.location;
const searchParams = parseQueryString(search.substring(1));
@@ -422,4 +423,4 @@ OrganizationAccessList.propTypes = {
};
export { OrganizationAccessList as _OrganizationAccessList };
export default withNetwork(OrganizationAccessList);
export default withRouter(withNetwork(OrganizationAccessList));

View File

@@ -148,11 +148,7 @@ class Organization extends Component {
<Route
path="/organizations/:id/access"
render={() => (
<OrganizationAccess
match={match}
location={location}
history={history}
/>
<OrganizationAccess />
)}
/>
<Route

View File

@@ -23,19 +23,10 @@ class OrganizationAccess extends React.Component {
}
render () {
const {
location,
match,
history,
} = this.props;
return (
<OrganizationAccessList
getAccessList={this.getOrgAccessList}
removeRole={this.removeRole}
match={match}
location={location}
history={history}
/>
);
}