mirror of
https://github.com/ZwareBear/awx.git
synced 2026-05-14 15:58:38 -05:00
excise withRouter from function components
This commit is contained in:
@@ -1,13 +1,15 @@
|
||||
import React, { useState } from 'react';
|
||||
import { withRouter } from 'react-router-dom';
|
||||
import { useHistory } from 'react-router-dom';
|
||||
import { withI18n } from '@lingui/react';
|
||||
import { CardBody } from '@components/Card';
|
||||
import UserForm from '../shared/UserForm';
|
||||
import { UsersAPI } from '@api';
|
||||
|
||||
function UserEdit({ user, history }) {
|
||||
function UserEdit({ user }) {
|
||||
const [formSubmitError, setFormSubmitError] = useState(null);
|
||||
|
||||
const history = useHistory();
|
||||
|
||||
const handleSubmit = async values => {
|
||||
setFormSubmitError(null);
|
||||
try {
|
||||
@@ -34,4 +36,4 @@ function UserEdit({ user, history }) {
|
||||
);
|
||||
}
|
||||
|
||||
export default withI18n()(withRouter(UserEdit));
|
||||
export default withI18n()(UserEdit);
|
||||
|
||||
Reference in New Issue
Block a user