mirror of
https://github.com/ansible/awx.git
synced 2026-02-12 15:14:45 -03:30
update OrganizsationAccess and OrganizationAccessList w mountWithContexts
This commit is contained in:
@@ -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));
|
||||
|
||||
@@ -148,11 +148,7 @@ class Organization extends Component {
|
||||
<Route
|
||||
path="/organizations/:id/access"
|
||||
render={() => (
|
||||
<OrganizationAccess
|
||||
match={match}
|
||||
location={location}
|
||||
history={history}
|
||||
/>
|
||||
<OrganizationAccess />
|
||||
)}
|
||||
/>
|
||||
<Route
|
||||
|
||||
@@ -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}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user