|
|
@@ -1,4 +1,4 @@
|
|
|
-import {ErrorBoundary, Loading, Modal} from '@components';
|
|
|
+import {ErrorBoundary, Loading, Modal, ModalBtnGroup} from '@components';
|
|
|
import {FC, Suspense} from 'react';
|
|
|
import ReactModal from 'react-modal';
|
|
|
import {useFormState} from './hooks';
|
|
|
@@ -20,7 +20,7 @@ type Props = {
|
|
|
};
|
|
|
|
|
|
const UserModal: FC<Props> = function({visible, onClose, onFetch, id}) {
|
|
|
- const [{control, isLoading, formInstance}, {onSubmit}] = useFormState({
|
|
|
+ const [{isLoading, formInstance}, {onSubmit}] = useFormState({
|
|
|
onClose, onFetch, id, visible,
|
|
|
});
|
|
|
|
|
|
@@ -37,12 +37,8 @@ const UserModal: FC<Props> = function({visible, onClose, onFetch, id}) {
|
|
|
<FormProvider {...formInstance}>
|
|
|
<ErrorBoundary>
|
|
|
<Suspense fallback={<Loading tip='正在获取用户信息' />}>
|
|
|
- <UserModalInfo
|
|
|
- id={id}
|
|
|
- onClose={onClose}
|
|
|
- control={control}
|
|
|
- isLoading={isLoading}
|
|
|
- />
|
|
|
+ <UserModalInfo id={id} />
|
|
|
+ <ModalBtnGroup onClose={onClose} isLoading={isLoading} />
|
|
|
</Suspense>
|
|
|
</ErrorBoundary>
|
|
|
</FormProvider>
|